Skip to content

Instantly share code, notes, and snippets.

Ricky Nelson socketwiz

Block or report user

Report or block socketwiz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View data-work-in-progress.js
const DATA = {
'rooms': [
{
'name': 'sim',
'spawn': {
'name': 'SpawnSim',
'position': {
'x': 7,
@socketwiz
socketwiz / Dockerfile
Created Feb 28, 2017
Java v9, maven and tomcat
View Dockerfile
#
# Oracle Java 9 Dockerfile
#
# https://github.com/cogniteev/docker-oracle-java
# https://github.com/cogniteev/docker-oracle-java/tree/master/oracle-java9
#
# Pull base image.
FROM ubuntu:16.04
@socketwiz
socketwiz / promise.js
Last active Jan 15, 2016
ajax promises
View promise.js
var $promise = $.ajax(options);
$promise
.then(function(data){
// data will be from the ajax call
return data;
})
.then(function(data){
// data will be the data you return from the previous call
return 'foo';
@socketwiz
socketwiz / cloud-config.yml
Last active Apr 6, 2018
CoreOS cloud-config for DigitalOcean with iptables firewall
View cloud-config.yml
#cloud-config
coreos:
etcd2:
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3
# specify the initial size of your cluster with ?size=X
discovery: https://discovery.etcd.io/<token>
# 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
socketwiz / standard.json
Created Oct 20, 2013
Template for creating SmartOS zones.
View standard.json
{
"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
socketwiz / smartos.md
Last active Sep 30, 2017
SmartOS cheat sheet
View smartos.md

Create a dvd or flash drive: http://wiki.smartos.org/display/DOC/Download+SmartOS

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
View rover-executor.py
#
# RoverExecutor.py
# Rover
#
# Created by Ricky Nelson on 7/16/10.
#
from Foundation import *
from AppKit import *
import subprocess
@socketwiz
socketwiz / tmux.md
Created May 21, 2012
TMUX cheat sheet
View tmux.md

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

command PREFIX
ctrl-b

detach
PREFIX d

@socketwiz
socketwiz / vim.markdown
Last active Apr 20, 2018
Vim cheat sheet
View vim.markdown

motions

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
You can’t perform that action at this time.