Skip to content

Instantly share code, notes, and snippets.

@jbott
jbott / appify.sh
Last active August 29, 2015 14:26 — forked from advorak/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon) (Working with ZSH with spaces in the name)
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF
appify v3.0.0 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
#define READ_COUNT 5
float volts[READ_COUNT];
void setup()
{
Serial.begin(9600);
}
void loop()
@jbott
jbott / init.sh
Created June 19, 2015 21:36
Minecraft init script for tmux
#!/bin/sh
# Go to script directory
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
### Configuration ###
XMS="1G"
XMX="1G"
JAR="minecraft_server.jar"
JAVA_BIN="../java/jdk1.8.0_45/bin"
@jbott
jbott / mqtt-tree.py
Last active August 29, 2015 14:16
MQTT Tree in python, very rough
#pip install paho-mqtt
#pip install git+https://github.com/mbr/asciitree.git
import asciitree
import paho.mqtt.client as mqtt
import sys
from collections import defaultdict
from time import sleep
tr = asciitree.LeftAligned()
@jbott
jbott / add_metro_pl_models.lua
Created July 12, 2014 22:21
MetroPlayerModels Garry's Mod
AddCSLuaFile()
player_manager.AddValidModel("ranger1", "models/metro2033/nikout/ranger1.mdl")
player_manager.AddValidModel("ranger1_pl", "models/metro2033/nikout/player/ranger1.mdl")
player_manager.AddValidModel("ranger2_pl", "models/metro2033/nikout/player/ranger2.mdl")