How to add spacers to the macOS dock

Published 2018-01-12, 23:18

  1. Open Terminal
  2. defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
  3. killall Dock

Source: https://howchoo.com/g/zdnmodkyngn/add-spacers-to-your-macs-dock

How to Install Ruby with rbenv on Ubuntu 16.04

Published 2017-12-13, 14:48

Each time I have to install Ruby + rbenv + bundler manually on a Ubuntu machine I somehow mess it up and have to google for a tutorial, then try some until I find a working one.

This one here did work perfectly yesterday, when it was time to do it once again: https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-16-04

How to create a macOS High Sierra VM with VMware

Published 2017-12-01, 22:07

How to create a macOS High Sierra VM with VirtualBox

Published 2017-11-24, 00:43

Unix command line: How to output to command line and file at the same time

Published 2017-11-22, 12:34

Use:

foo | tee output.file

https://stackoverflow.com/questions/418896/how-to-redirect-output-to-a-file-and-stdout/418899#418899

Send tabs/URLs between desktop and iOS device

Published 2017-10-18, 15:26

Yay, with Firefox iOS it is finally possible to send tabs and URLs between desktop and iOS devices, in both directions.

iOS to Desktop

From Firefox for iOS to desktop computer, the functionality has its own button in the „tab options menu“ and a great explanation in the knowledge base.

What isn’t mentioned there is that Firefox for iOS also adds a „Send Tab“ share extension to iOS that is accessible from normal Safari. You can use it to send any open tab from Safari to your Firefox Desktop installations. You get a OS notification and the tab is automatically opened in the background when the information is received after a few seconds.

Desktop to iOS

In the other direction, from desktop computer to smartphone, you can use the „Send Tab to device“ extension to add a new Option „Send Page to Device“ to the right click menu of websites and tabs. Using it sends the URL to Firefox for iOS were it also opens a tab.

Only thing missing here is a push notification that also tells you that there is data waiting for you when Firefox iOS is not already open and a simpler way to get the URL from Firefox iOS to Safari – right now one has to manually copy the URL over.

Disable Windows Defender real time protection with a Desktop Shortcut

Published 2017-10-05, 17:31

I love how Microsoft made third party anti virus protection obsolete with Defender – it just works.

Unfortunately sometimes I need to disable (and later enable again) it’s real time protection feature because it slows down processes I know are secure – for example Gradle builds in Android Studio.

It normally takes 7 clicks to enable or disable Defender real time protection: Systray -> double click on icon -> „Virus & threat protection“ -> „Virus & threat protection settings“ -> Toggle „Real-time protection“ -> User Account Control „Yes“.

Fortunately there is a way to automate this in Powershell:

Set-MpPreference -DisableRealtimeMonitoring $true

Which means we can also create a desktop shortcut (Right click on Desktop -> New -> Shortcut):

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:/disable.ps1"

(„C:/disable.ps1“ is the file where I put the first code snippet)

In the properties you have to click „Advanced“ to activate „Run as Administrator“ so it can actually be executed.

Then to give it a nice icon, click „Change Icon“ in the shortcut properties and „open“ the icons from „%systemroot%\system32\imageres.dll“. There you’ll find a nice dark red Defender like „badge“ icon with a white x:

The real time protection feature will turn itself back on after some time. Alternatively you could replace „$true“ with „$false“ in a copy of that script to have a shortcut to enable it again. Or spend some time to figure out how to actually „toggle“ in on and off with the same shortcut by somehow doing this in the Powershell script. (Let me know if you do!)

Source: Script via StackOverflow answer by ‚djsmiley2k‘ to my question and icons file for the shortcut

Website Performance, Code, Images and SEO Testing Tools

Published 2017-09-29, 12:48

There are loads of web site and page analyzer tools out there that look at them under performance, quality, image compression, code or SEO aspects. Many are just (thinly veiled) lead generation tools that don’t really tell the true story, but some are actually useful. As I need them again and again, I collected them here:

More on the marketing-y, rarely even questionable side, but sometimes still interesting to look at:

About StackOverflow

Published 2017-09-22, 16:35

I tried to post a few questions on StackOverflow in the last days which at times was a very negative experience: I was downvoted, got negative comments and of course got my questions closed as „offtopic“.

I am not the only one with that problem:

  1. https://hackernoon.com/the-decline-of-stack-overflow-7cb69faa575d
  2. https://movingfulcrum.com/stackoverflow-modding-itself-out-of-existence/

Why do I write this down now? So I don’t start googling for exactly these posts and experiences the next time I am in this position, but can just go to this post, read some of these rants and accept it.

Then I can go back and see that maybe someone actually did provide a great comment or answer. Sometimes that still happens.

Rewriting history in Git

Published 2017-09-20, 21:00

Once again I was confused about rewriting history in Git:

As I am not a git power user – I use a GUI, SourceTree of GitKraken – for the more complicated commands and features, my mind tends to just „crash“ now and then and forget what they are and how they work.

A bit later I had it figured out again:

During these 15 minutes I googled around and found some nice explanations I now want to conserve for future reference:

And an additional nice thing to know and use when playing around with those:

26 queries. 0,204 seconds.