Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# READ MORE HERE: http://www.webdevotion.be/blog/2012/06/06/terminal-git-branch-status-colored-icons | |
# ============================================================================== | |
# FANCY GIT STATUS ICONS | |
# ============================================================================== | |
# SOME VARIABLES in capitals | |
# no whitespace between variable names and = sign! | |
COLOR_RESET="\e[00m" | |
COLOR_GREEN="\e[1;32m" | |
COLOR_RED="\e[00;31m" |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/bin/sh | |
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
-- another way of waiting until an app is running | |
on waitUntilRunning(appname, delaytime) | |
repeat until my appIsRunning(appname) | |
tell application "Messages" to close window 1 | |
delay delaytime | |
end repeat |
#!/bin/sh | |
# Create a bootable ISO from the OS X Mavericks app | |
# http://thezinx.com/misc/trend/create-bootable-dmg-iso-mavericks-app/ | |
if [ ! -f /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg ]; then | |
echo "Download the OS X Mavericks App and then rerun this script." | |
open "https://itunes.apple.com/us/app/os-x-mavericks/id675248567" | |
exit 1 | |
fi |
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
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
# Cordova Global | |
plugins/ | |
# iOS Platform | |
platforms/ios/build/ | |
platforms/ios/www/ | |
platforms/ios/cordova/console.log | |
*.xcuserdatad | |
# Android Platform |
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html | |
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1 | |
# Install pandoc and asciidoctor | |
$ sudo apt install asciidoctor | |
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb | |
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb | |
# Convert asciidoc to docbook using asciidoctor |
# ~/Library/LaunchAgents/org.verdaccio.launcher.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.verdaccio.launcher</string> | |
<key>Program</key> | |
<string>/Users/user/Scripts/verdaccio.sh</string> | |
<key>RunAtLoad</key> |