Skip to content

Instantly share code, notes, and snippets.

var centralLocation = "http://central.com/~tav/central.html",
centralChannel,
messageId = 0,
messageQueue = [],
callbackRegistry = {},
firstContact = false;
function createCentralChannel() {
if (centralChannel) {
return;
@samrose
samrose / README.md
Created August 11, 2012 15:38 — forked from jamesjohnson/README.md
Ubuntu 11.10, PostGIS 1.5 Setup Script

Installing PostGIS

Ubuntu 11.10

sudo apt-get install postgresql-9.1-postgis
sudo su postgres
bash <(curl -s https://raw.github.com/gist/18660599/create_template.sh)

Ubuntu 11.04

set nocompatible
syntax on
filetype on
filetype plugin on
filetype indent on
set sidescroll=1
set sidescrolloff=3
#!/bin/sh
# Debian has older Erlang package (R15) in official repositories, Elixir requires newer (R17)
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install -y erlang
rm erlang-solutions_1.0_all.deb
# compile Elixir from source
@samrose
samrose / zeromq_install.sh
Last active July 1, 2016 21:08 — forked from cdjhlee/zeromq_install.sh
install zeromq in ubuntu 14.04
#!/usr/bin/bash
##############################################
#from http://zeromq.org/intro:get-the-software
##############################################
#get zeromq
wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz
#unpack tarball package
@samrose
samrose / README.md
Created July 13, 2017 11:10 — forked from bertspaan/README.md
Python script to convert DBF database file to CSV
@samrose
samrose / introrx.md
Created April 25, 2018 17:13 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@samrose
samrose / snake-nginx.nix
Created July 10, 2018 13:29 — forked from thoughtpolice/snake-nginx.nix
A complete example of a working Hydra build machine and other stuff.
let
# Wrap a nginx server block in an HTTPS site
wrapSSL = site: cert: key: block: ''
server {
listen 80;
listen [::]:80;
server_name ${site};
location /nginx_status {
stub_status on;
@samrose
samrose / configuration.nix
Created July 18, 2018 17:47 — forked from seanjensengrey/configuration.nix
Nixos with raid-0 root partition using mdadm
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
# Download graphical ISO, http://nixos.org/nixos/download.html
# if you want to do an install over an SSH connection
# $ systemctl start sshd.service
# $ useradd remoteinstaller
# $ passwd remoteinstaller
@samrose
samrose / cnxsoft.md
Created July 20, 2018 16:26 — forked from stefanozanella/cnxsoft.md
Emulate a Raspberry Pi with Qemu+ KVM

Booting with CNXSoft image

Reference: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/

curl -O https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z

yum install p7zip
7za e 2012-07-15-wheezy-raspian-minimal.img.7z

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no