Archive for 2020
Posted by jpluimers on 2020/06/10
Sometimes you are stuck. Then this often helps, even outside the music industry:
[WayBack] Oblique strategies – defeat creative block: Draw random Oblique Strategy cards to break through creative block.
These are disruptive which is the whole point being stuck.
Obey the first and only rule: pick the first card and apply what it says.
- Do NOT fall for the urge to draw multiple cards.
- Do NOT make a list of all cards then choose from it.
Both above failures kill the randomness of the above strategy.
More on them at [WayBack] Oblique Strategies – Wikipedia
Via:
–jeroen
Read the rest of this entry »
Posted in Agile, Development, LifeHacker, Power User, Software Development | Leave a Comment »
Posted by jpluimers on 2020/06/10
A while ago, I had to execute a series of aliases of which the names were stored in an array. A simple for loop with en eval call did the job.
Then I found out there are at least two more ways of evaluation in bash, so here are just a few links giving me a head start if I ever dig this up again:
Note that looping over parameters is different than over an array: [WayBack] Loop through an array of strings in Bash? – Stack Overflow
ou can use it like this:
## declare an array variable
declare -a arr=("element1" "element2" "element3")
## now loop through the above array
for i in "${arr[@]}"
do
echo "$i"
# or do whatever with individual element of the array
done
# You can access them using echo "${arr[0]}", "${arr[1]}" also
Also works for multi-line array declaration
declare -a arr=("element1"
"element2" "element3"
"element4"
)
–jeroen
Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2020/06/09
The PlasticSCM GUI does not allow you to edit the paths of Workspaces (you can either rename a workspace or delete edit; no other editing options are available).
Luckily you can do this by hand editing the configuration files in %LocalAppData%\plastic4, though this is largely undocumented
Some of those configuration files are explained in [WayBack] Configuration files – Installation and configuration – Plastic SCM Community, but plastic.workspaces is not, so here are the steps:
Read the rest of this entry »
Posted in Development, PlasticSCM, Software Development, Source Code Management | Leave a Comment »
Posted by jpluimers on 2020/06/09
I’ve added this to my ~/.bashrc to stuff installed by pip install --user is accessible from interactive shells:
# set PATH so it includes user's private python "pip --user" bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$PATH:$HOME/.local/bin"
fi
The addition is at the end of the path. It is a choice: it means machine installs take prevalence over user installs. That’s usually what I want. For more considerations (including non-interactive shells), see [WayBack] bash – How to correctly add a path to PATH? – Unix & Linux Stack Exchange.
The --user installs do not affect the full system, nor other users.
Further reading:
–jeroen
Posted in Development, Python, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2020/06/09
This is part of a bash alias where I had to use quadruple backslash in order to escape it for sed:
# The sed with quad //// is to prevent 'unterminated substitute in regular expression':
alias x='... | sed "s/=.*/ \\\\/"'
This is needed because bash will escape \\\\ into \\ which sed then escapes to \.
The easiest way to find this is to replace the sed with echo to see the expansion.
References:
–jeroen
Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, sed, Software Development | 2 Comments »
Posted by jpluimers on 2020/06/08
Cool:
use command:
fsutil hardlink list MyFileName.txt
It lists all hardlinks to file with name MyFileName.txt.
Source: [WayBack] hardlink – How can I find hard links on Windows? – Super User
More information at [WayBack] Fsutil hardlink | Microsoft Docs on
fsutil hardlink create <NewFileName> <ExistingFileName>
fsutil hardlink list <Filename>
–jeroen
Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1 | Leave a Comment »
Posted by jpluimers on 2020/06/08
For a really nice overview of most basic and intermediate usage of ssh, read [WayBack] SSH Essentials: Working with SSH Servers, Clients, and Keys | DigitalOcean.
It is large (printed to PDF it is 30+ pages in either A4 or Letter format) but well worth reading as it covers a lot in manageable bits.
Does it mean I won’t write about ssh again?
I will continue, as most of my blog posts are relatively short highlighting a small thing at a time (that is how I learn best, hopefully some of you do as well).
It does not explain really advanced stuff (like ProxyCommand), so here is a start of things I want to learn more about:
–jeroen
Posted in *nix, *nix-tools, Power User, ssh/sshd | Leave a Comment »
Posted by jpluimers on 2020/06/05
On my research list: find out why a Local Administrator on Windows 10 Professional x64 did get “access denied” just when executing wmic:
–jeroen
Posted in Power User, Windows | Leave a Comment »