Skip to content

Instantly share code, notes, and snippets.

@logic855
logic855 / nginx.conf
Created January 18, 2016 14:59 — forked from erikcw/nginx.conf
Simple nginx lua script to add UUID to each request for end to end request tracking.
# Dependencies
# nginx_lua
# lua uuid module (luarocks install uuid)
http {
# this will be the request id
map $host $request_uuid {
default '';
}
@logic855
logic855 / tmux.conf
Created November 23, 2015 14:24 — forked from shinzui/tmux.conf
tmux.conf
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
# Type(<scope>): <subject>
# <body>
# <footer>
# Type should be one of the following:
# * feat (new feature)
# * fix (bug fix)
# * docs (changes to documentation)
# * style (formatting, missing semi colons, etc; no code change)
# * refactor (refactoring production code)
@logic855
logic855 / iterm2.zsh
Last active August 29, 2015 14:24 — forked from wadey/iterm2.zsh
# Usage:
# source iterm2.zsh
# iTerm2 window/tab color commands
# Requires iTerm2 >= Build 1.0.0.20110804
# http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes
tab-color() {
echo -ne "\033]6;1;bg;red;brightness;$1\a"
echo -ne "\033]6;1;bg;green;brightness;$2\a"
echo -ne "\033]6;1;bg;blue;brightness;$3\a"
@logic855
logic855 / config
Last active August 29, 2015 14:23 — forked from OrangeTux/config
# irssi-xmpp plugin required
# http://cybione.org/~irssi-xmpp/
servers = (
{
address = "chat.facebook.com";
chatnet = "facebook";
password = "<password>";
autoconnect = "true";
},
{
@logic855
logic855 / vmip.sh
Last active August 29, 2015 14:22 — forked from jasonpincin/vmip.sh
#!/usr/bin/bash
# Updates IP addresses of a SmartOS VM
# This script stops the VM, updates the IP address(es),
# and starts the VM back up.
#
# Usage:
# vmip.sh <uuid> <ip1> [ip2] [ip3] [...]
#
# The IP's are applied to NICs of the VM in order. The
# host group
[smartos-zones]
server1.example.com
server2.example.com
server3.example.com
# modify python path
[smartos-zones:vars]
ansible_python_interpreter = /opt/local/bin/python
@logic855
logic855 / gist:89af0879733adf2c7723
Created April 22, 2015 15:08 — forked from jctanner/gist:7602743
creating an ansible zone
imgadm import a1d74530-4212-11e3-8a71-a7247697c8f2
vmadm create <<EOF
{
"alias": "ansible"
,"hostname": "ansible"
,"zfs_root_compression": "on"
,"autoboot": false
,"brand": "joyent"
,"dataset_uuid": "a1d74530-4212-11e3-8a71-a7247697c8f2"
,"max_physical_memory": 256
#!/usr/bin/env bash
set -e
if [ -z "$iso" ] ; then
printf -- ">>> You must invoke with iso=/path/to/winxp.iso $(basename $0)\n"
exit 1
fi
if [ -z "$url" ] ; then
#!/bin/bash
# Simple Ad Hoc Carbon Cache Service
#
# put in /opt/custom/share/svc/carbon-cache.sh
set -o xtrace
. /lib/svc/share/smf_include.sh
cd /
PATH=/usr/sbin:/usr/bin:/opt/custom/bin:/opt/custom/sbin; export PATH