Skip to content

Instantly share code, notes, and snippets.

socketwiz / data-work-in-progress.js
Created May 13, 2017 22:21
Screeps refactor idea
const DATA = {
'rooms': [
'name': 'sim',
'spawn': {
'name': 'SpawnSim',
'position': {
'x': 7,
socketwiz / Dockerfile
Created February 28, 2017 12:03
Java v9, maven and tomcat
# Oracle Java 9 Dockerfile
# Pull base image.
FROM ubuntu:16.04
socketwiz / promise.js
Last active January 15, 2016 15:13
ajax promises
var $promise = $.ajax(options);
// data will be from the ajax call
return data;
// data will be the data you return from the previous call
return 'foo';
socketwiz / cloud-config.yml
Last active April 6, 2018 06:51
CoreOS cloud-config for DigitalOcean with iptables firewall
# generate a new token for each unique cluster from
# specify the initial size of your cluster with ?size=X
# multi-region and multi-cloud deployments need to use $public_ipv4
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
socketwiz / standard.json
Created October 20, 2013 19:35
Template for creating SmartOS zones.
"brand": "joyent",
"zfs_io_priority": 30,
"quota": 20,
"image_uuid": "dac2ad6e-2aa5-11e3-885f-8fd408fc6a82",
"max_physical_memory": 4096,
"alias": "<name>",
"hostname": "<name>",
"dns_domain": "<domain>",
"resolvers": ["<ip>"],
socketwiz /
Last active September 30, 2017 19:24
SmartOS cheat sheet

Create a dvd or flash drive:

Boot the image on the hardware of your choice

It will ask you the following:

  1. ip or dhcp
  2. it will enumerate the disks it finds and ask you to type in the ones you want SmartOS to manage, type in the ones you want
  3. root password
# Rover
# Created by Ricky Nelson on 7/16/10.
from Foundation import *
from AppKit import *
import subprocess
socketwiz /
Created May 21, 2012 16:02
TMUX cheat sheet

named session
tmux new -s <name>
add -d to run in the background

command PREFIX


socketwiz / vim.markdown
Last active October 13, 2021 14:15
Vim cheat sheet


motion description
h Count characters left
l Count characters right
^ To the first character of the line
$ To the last character of the line
f<char> To the counth character occurrence to the right. F<char> to the counth character occurrence to the left
t<char> To 1 character just before the counth character occurrence to the right