Just in case I need to do performance troubleshooting in Rails some day: [Archive.is] hey on Twitter: “@shelbyspees @honeycombio From a browser. Thinking is we had trouble even narrowing it down to a section of the site. Thinking if we could see that most of the load was in some_controller we could maybe dig in there. I don’t want to take up too much of your time, but how would a double request show up?” / Twitter
Archive for the ‘Development’ Category
In case I ever need rails performance troubleshooting:Â I feel like I should be able to ask @datadoghq “What’s the CPU load across all our Rails controllers”, but have no idea where to start with that.
Posted by jpluimers on 2021/12/08
Posted in Development, Ruby, Software Development | Leave a Comment »
Chrome Print dialogue not offering fit to page, landscape, other printing options ( I’m looking at you @OHRA )
Posted by jpluimers on 2021/12/08
Some sites manage to disable various printing options (including layout, so you cannot choose between landscape and portrait any more, or force landscape when portrait works better or vice versa).
Googling this got me into a web of things that didn’t help me (see links below), but those led me to this query [Wayback] chrome save as pdf layout missing portrait landscape – Google Search.
That returned a helpful result at [Archive.is/Wayback] Chrome Print dialogue not offering fit to page, landscape, other printing options – Google Chrome Community:
It’s about the extension [Archive.is] Stylus – Chrome Web Store
Redesign the web with Stylus, a user styles manager. Stylus allows you to easily install themes and skins for many popular sites.
I reconfigured the OHRA Mijn Zorg site to force re-enabling of layout by adding @page { size: auto !important; } for https://mijn.ohrazv.nl/ (click the Save button to save this change permanently):
Posted in Chrome, CSS, Development, Google, HTML, Power User, Software Development, Web Development | Leave a Comment »
How to build a CD ISO image file from the windows command line? – Stack Overflow
Posted by jpluimers on 2021/12/07
As I might need this in the future, some highlights from [Wayback] How to build a CD ISO image file from the windows command line? – Stack Overflow:
mkisofs, part of [Wayback] cdrtools (formerly cdrecord) with separately hosted [Wayback] win32 builds (and some win64) and [Wayback] sources on sourceforge.net (it is also available for many other platforms).
Examples:
mkisofs -v -dvd-video -V "VOLUME_NAME" -o "c:\my movies\iso\movie.iso" "c:\my movies\dvd" mkisofs -r -R -J -l -L -o image-file.iso c:\project\install- The GitHub hosted open source .NET Core project [WayBack] DiscUtils that besides the ISO file system also supports many other file systems (like UDF, FAT and NTFS) and disc formats (like VHD, VDI, XVA, VMDK, etc).
- The commandline part
cdbxpcmdof [Wayback] cdburnerxp.
With some examples:
cdbxpcmd --burn-data -folder:input -iso:output.iso -format:iso -changefiledatescdbxpcmd --burn-data -layout:mycompilation.dxp -iso:output.iso -format:iso - The built-in Windows API IMAPI which [Wayback] can be found in MSDN with some examples at:
- [Wayback] com – Create ISO image using PowerShell: how to save IStream to file? – Stack Overflow
- [Wayback] Demo for PowerShell script to create ISO using IMAPI COM component, as a simplification for StackOverflow answer http://stackoverflow.com/a/8325316/223837
- [Wayback] https://stackoverflow.com/a/46068167
–jeroen
Posted in Development, Power User, Software Development, Windows, Windows Development | Leave a Comment »
On TStrings (and TStringList) sorting: what the default Sort behaviour is and how to change sorting order
Posted by jpluimers on 2021/12/07
Because I need this eventually, here the full quote of my answer in [Wayback] sorting – How can I get TStringList to sort differently in Delphi – Stack Overflow (The default Sort behaviour is to accommodate i18n sorting in natural order):
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development, Undocumented Delphi | Leave a Comment »
When a cross-head screw is not Philips, and you might need a JIS screwdriver
Posted by jpluimers on 2021/12/06
A while ago, when messing with some Asian electronics, I found that the cross-head screws in it do not fit Philips screwdrivers well.
The cause is the use of JIS (Japanese Industry Standard) cross-head screws in Japan and some other Asian regions.
JIS screws can also been found in other Asian mechanical stuff like motor-cycles and cars.
Here are some links about JIS screws and screwdrivers.
- [WayBack] JIS – Japanese Industrial Standard

- [WayBack] Screwdriver – Wikipedia
- [WayBack] When a Phillips Is Not a Phillips! : 30 Steps (with Pictures) – Instructables (with about 30 different screw head types)
- [WayBack] The Japanese Phillips: JIS Screwdrivers — revlimiter.net (with a list of sources where to get the screwdrivers)
- [WayBack] What’s the Difference Between Japanese and Phillips Screwdrivers? – Ask MO
Posted in DIY, Electronics Development, LifeHacker, Power User | Leave a Comment »
Github markdown: red text
Posted by jpluimers on 2021/12/02
Github officially does not support coloured text, but with a small trick, you can get a few colours by including a diff file in the markdown.
I did it when I had to put on hold open source projects due to rectum cancer recovery, for instance [Wayback] this fritzcap diff added the [Wayback] text:
which [Wayback] rendered becomes a kind of red bulleted list:
I learned this trick via [Wayback] How to add color to Github’s README.md file – Stack Overflow (thanks to [Wayback] revisions by [Wayback] craigmichaelmartin, [Wayback] Noam Manos and [Wayback] GalaxyCat105):
You can use theÂ
diff language tag to generate some colored text:```diff - text in red + text in green ! text in orange # text in gray @@ text in purple (and bold)@@ ```However, it adds it as a new line starting with eitherÂ
- + ! #Â or starts and ends withÂ@@
This issue was raised in [Wayback] github markup #369, but they haven’t made any change in decision since then (2014).
By now there is a new issue, again with little progress: [Wayback] Color text in markdown · Issue #1440 · github/markup
–jeroen
Posted in Color (software development), Development, Lightweight markup language, MarkDown, Software Development | Leave a Comment »
LanguageTool – Online Grammar, Style & Spell Checker (English, German, Dutch, French, …)
Posted by jpluimers on 2021/12/02
Cool when writing texts in languages I don’t often write in, so I can read them better than I write them:
[Wayback/Archive.is] LanguageTool – Online Grammar, Style & Spell Checker
It supports English (many variations, including US and UK English), German (Swiss and Austrian German too!), Dutch, and many other languages.
–jeroen
Posted in Development, LifeHacker, Power User, Software Development | Leave a Comment »
parsing – delphi – strip out all non standard text characers from string – Stack Overflow
Posted by jpluimers on 2021/12/02
From a while back a totally non-optimised code example by me (intentionally limiting to AnsiStr as it was about filtering ASCII, and UniCode has way many code points for the Latin script).
// For those who need a disclaimer:
// This code is meant as a sample to show you how the basic check for non-ASCII characters goes
// It will give low performance with long strings that are called often.
// Use a TStringBuilder, or SetLength & Integer loop index to optimize.
// If you need really optimized code, pass this on to the FastCode people.
function StripNonAsciiExceptCRLF(const Value: AnsiString): AnsiString;
var
AnsiCh: AnsiChar;
begin
for AnsiCh in Value do
if (AnsiCh >= #32) and (AnsiCh <= #127) and (AnsiCh <> #13) and (AnsiCh <> #10) then
Result := Result + AnsiCh;
end;
and an optimised one by [WayBack] David Heffernan
function StrippedOfNonAscii(const s: string): string;
var
i, Count: Integer;
begin
SetLength(Result, Length(s));
Count := 0;
for i := 1 to Length(s) do begin
if ((s[i] >= #32) and (s[i] <= #127)) or (s[i] in [#10, #13]) then begin
inc(Count);
Result[Count] := s[i];
end;
end;
SetLength(Result, Count);
end;
Even when “trivial”, I usually do not prematurely optimise as optimised code is almost always less readable than non-optimised code.
Source: [Wayback] parsing – delphi – strip out all non standard text characers from string – Stack Overflow
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
console convert pcap to wav: not easily possible; use the WireShark GUI to do
Posted by jpluimers on 2021/12/01
Wanting a simple way on the console to convert a .pcap file to a .wav file, I searched for [Wayback] console convert pcap to wav – Google Search.
The reason is that [Wayback] fritzcap (written in Python) sometimes crashes while doing the conversion of a phone recording, so then only the .pcap file is available. I still want to figure this out, but given my health situation, I might not be able to in time.
Posted in *nix, *nix-tools, Audio, Development, ffmpeg, Fritz!, Fritz!Box, fritzcap, Hardware, Media, Network-and-equipment, Power User, Python, Scripting, Software Development, Wireshark | Leave a Comment »









