Skip to the relevant sections if needed.
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist | |
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist |
import org.gradle.internal.os.OperatingSystem; | |
String getJavaHome(String version) { | |
def stdout = new ByteArrayOutputStream() | |
exec { | |
commandLine "/usr/libexec/java_home", "-v", version | |
standardOutput = stdout; | |
} | |
return stdout.toString().trim() | |
} |
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2011 Sebastian Wiesner <[email protected]> | |
# Modifications by Charl Botha <[email protected]> | |
# * customWidgets support (registerCustomWidget() causes segfault in | |
# pyside 1.1.2 on Ubuntu 12.04 x86_64) | |
# * workingDirectory support in loadUi | |
# found this here: | |
# https://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.py |
<# | |
{ | |
"info": { | |
"Statement": "Code is poetry", | |
"Author": "Joerg Hochwald", | |
"Contact": "[email protected]", | |
"Link": "http://hochwald.net", | |
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues" | |
}, | |
"Copyright": "(c) 2012-2015 by Joerg Hochwald. All rights reserved." |
Services declared as oneshot
are expected to take some action and exit immediatelly (thus, they are not really services,
no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.
Let's create a example foo
service that when started creates a file, and when stopped it deletes it.
Create executable file /opt/foo/setup-foo.sh
:
- Install zsh from cygwin
- Install oh-my-zsh from https://github.com/robbyrussell/oh-my-zsh . Follow the manual instructions
- To make zsh default on ConEmu, create a task with
C:\cygwin64\bin\mintty.exe /usr/bin/zsh -
. Make it the defaut shell. - To start a zsh shell on demand, add this batch script to your path or start menu or wherever.
start C:\cygwin64\bin\mintty.exe /usr/bin/zsh -
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
#!/usr/bin/env bash | |
# echo -e "a\nb\nc\n" | lastln b | |
function lastln() { | |
pattern="$1" | |
i=0 | |
n=-1 | |
while read line; do | |
if [[ "$line" == "$pattern" ]]; then | |
n=$i |