Posted by jpluimers on 2018/02/14
I’m still amazed this is not in stock Mac OS X:
In Finder > Select a folder > Right click, we get a popup with an option to create a new folder:Is there a way to add menu item New Textfile for adding a new text file?
[WayBack] macos – Right-click, create a new text file. How? – Ask Different
One way is to use Automator scripts, but: scripting…
–jeroen
Posted in Apple, Automator scripts, Development, iMac, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, macOS 10.12 Sierra, OS X 10.10 Yosemite, OS X 10.11 El Capitan, OS X 10.9 Mavericks, Power User, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2018/02/08
Quite some time ago, I attended a great introductory elasticsearch/kibana workshop by Martijn Laarman (@Mpdreamz, github.com/Mpdreamz and SO martijn-laarman) that lead me into researching a lot of interesting new things:
–jeroen
Posted in Development, JavaScript/ECMAScript, JSON, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2018/02/07
pandas – Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
Pandas is on my research list. Some links to get started:
–jeroen
Posted in Development, Python, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2018/02/06
Thanks [WayBack] Mr. Rick for the answer as this is exactly the bit I needed:
Input:
set widget="a very useful item"
set widget
set widget=%widget:"=%
set widget
Output:
widget="a very useful item"
widget=a very useful item
[WayBack] Removing double quotes from variables in batch file creates problems with CMD environment – Stack Overflow
This trick is convenient in cases like this:
set LocalHostsFile="%windir%\System32\drivers\etc\hosts"
set LocalHostsTemplate="%LocalHostsFile:"=%.template"
The above replaces ALL double quotes with nothing.
If you want to smart replace (like done when de-quoting CSV), you need a bit more complex code like described in [WayBack] batch file – Remove quotes from named environment variables in Windows scripts – Stack Overflow, where you basically have two options:
- assigning inside a for loop
- assigning inside a subroutine
Both work because parameters used like %~x do get their quotes removed; you cannot use that syntax on plain variables.
–jeroen
Posted in Batch-Files, Development, Scripting, Software Development | 3 Comments »
Posted by jpluimers on 2018/01/02
Sometimes your Atom installation gets so unstable that the quickest solution is a reinstall. For that you need to get a list of user-installed packages, then re-install them.
On Windows your Atom Package Manager apm is here (but not in the path), where the first is version specific and the latter the most recent version:
%LOCALAPPDAT%\atom\app-1.18.0\resources\cli\apm.cmd
%LOCALAPPDATA%\atom\bin\apm.cmd
On Mac OS X, it is here and in the path:
/usr/local/bin/apm
/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm
Save your packages:
apm list --installed --bare > package-list.txt
Install packages:
apm install --packages-file package-list.txt
For my own memory, the settings folders:
- Windows:
%USERPROFILE%\.atom
- Mac OS X:
~/.atom
–jeroen
via:
Posted in atom editor, Development, JavaScript/ECMAScript, Node.js, Power User, Scripting, Software Development, Text Editors | Leave a Comment »
Posted by jpluimers on 2017/12/11
I while ago I had the error “error accessing the registry” while importing.
In my case I had escaped too many back-slashes. Not just the file names in the values, also the registry key names.
So I had key names like this:
[HKEY_CURRENT_USER\\Software]
That fails, but the error won’t tell you why. The key needs to be this:
[HKEY_CURRENT_USER\Software]
BTW: you do not need regedit.exe to import as reg.exe can do the same: [WayBack] How to add a .REG file to your Registry silently – Scott Hanselman
–jeroen
Posted in Development, Registry Files, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2017/12/07
Ah, C. The best lingua franca we have… because we have no other lingua francas. Linguae franca. Surgeons general? C is fairly old — 44 years, now! — and comes from a time when there were possibly more architectures than programming languages. It works well for what it is, and what it is is a relatively simple layer of indirection atop assembly. Alas, the popularity of C has led to a number of programming languages’ taking significant cues from its design, and parts of its design are… slightly questionable. I’ve gone through some common features that probably should’ve stayed in C and my justification for saying so. The features are listed in rough order from (I hope) least to most controversial. The idea is that C fans will give up when I call it “weakly typed” and not even get to the part where I rag on braces. Wait, crap, I gave it away.
Great re-read towards the end of the year: [WayBack] Let’s stop copying C / fuzzy notepad
Via: [WayBack] Old and busted: emacs vs vi. New and hot: Language war, everybody against everybody else. – Kristian Köhntopp – Google+
–jeroen
Posted in .NET, APL, Awk, bash, BASIC, C, C#, C++, COBOL, CoffeeScript, CommandLine, D, Delphi, Development, F#, Fortran, Go (golang), Java, Java Platform, JavaScript/ECMAScript, Pascal, Perl, PHP, PowerShell, PowerShell, Python, Ruby, Scala, Scripting, Software Development, TypeScript, VB.NET, VBScript | 3 Comments »