Skip to content

Instantly share code, notes, and snippets.

View stigkj's full-sized avatar

Stig Kleppe-Jørgensen stigkj

View GitHub Profile
<?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.openzfsonosx.ilovezfs.zfs.zpool-import</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/zpool</string>
<string>import</string>
#!/bin/sh
#
# Creates a SmartOS VM in VirtualBox (assuming you alread have VirtualBox installed)
#
# This script will:
# * Download the latest live ISO image of SmartOS
# * Create a VirtualBox VM, or update an existing VM with the latest ISO
# * Configure the VM with a zones disk, and boot it!
#
#
@stigkj
stigkj / README.md
Last active August 29, 2015 14:08 — forked from jpetazzo/README.md

Rectifier

The diode bridge is the simplest rectifier I know.

Rectifier lets you share a directory with a docker container (just like $yourvm shared folders).

You don't have to install anything in your containers, and you only need to install diod in the host. diod is packaged on Ubuntu/Debian distros, and will automatically be apt-get install-ed if needed.

Since it uses diod to make a bridge, I called it rectifier. Yeah, that sucks, so if you have a better name, I'll steal it!

@stigkj
stigkj / pid.js
Created December 27, 2013 13:34 — forked from FGRibreau/pid.js
//
// Usage: require('./pid')("myapp");
//
var fs = require('fs');
module.exports = function(appname){
process.title = appname;
var PID_FILE = "/usr/local/var/run/"+process.title+".pid";
#!/bin/sh
set -e
JAVA_VER=7
rm -f /tmp/oab-index.html /tmp/oab-download.html >/dev/null 2>&1 || true
trap "rm -f /tmp/oab-index.html /tmp/oab-download.html" EXIT ERR QUIT INT TERM
# Try and dynamic find the JDK downloads
echo " [x] Getting Java SE download page "
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y python-software-properties
RUN add-apt-repository ppa:webupd8team/java -y
RUN apt-get update
@stigkj
stigkj / gw.sh
Created October 1, 2013 20:06 — forked from dougborg/gw.sh
#!/bin/bash
# Find the system gradle executable to fall back on.
GRADLE=$(which gradle)
# Default names for things
GRADLEW='gradlew'
BUILD_GRADLE='build.gradle'
GRADLEW_FOUND=false
BUILD_GRADLE_FOUND=false
#!/bin/sh
#
# PROVIDE: btsync
# REQUIRE: LOGIN DAEMON NETWORKING
# KEYWORD: shutdown
#
# To enable BTSync, add this line to your /etc/rc.conf:
#
# btsync_enable="YES"
#
#!/bin/sh
exec <"$0" || exit; read v; read v; exec /usr/bin/osascript - "$@"; exit
-- the above is some shell trickery that lets us write the rest of
-- the file in plain applescript
tell application "Google Chrome"
activate
tell application "System Events"
tell process "Google Chrome"
#!/bin/bash
#/ jc -- jconsole via ssh proxy
#/
#/ Usage: jc [options] HOST JMX_PORT [PROXY_PORT=JMX_PORT] [JMX_HOST=HOST]
#/
#/ Starts a SOCKS proxy via ssh to connect to a
#/ JVM running on a remote and protected machine.
#/
#/ Arguments: