Skip to content

Instantly share code, notes, and snippets.

@jlord
jlord / index.js
Last active August 29, 2015 14:17
Atom Shell menubar app with @maxogden's menubar module
var menubar = require('menubar')
var exec = require('child_process').exec
var fs = require('fs')
var mb = menubar()
mb.on('ready', function ready () {
console.log('Ready!')
fetchTimes()
})
#!/bin/sh
# Make freebsd vm
# fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/amd64/Latest/FreeBSD-10.1-RELEASE-amd64.raw.xz
VM="FreeBSD10"
RAW_IMG="$1"
BASE_IMG="${RAW_IMG%.raw}"
VMDK_IMG="${BASE_IMG}.vmdk"
@max-mapper
max-mapper / index.js
Last active August 29, 2015 14:06
node tcp + http speed test
var net = require('net')
var through = require('through2')
var server = process.argv[2]
var path = process.argv[3]
var host = process.argv[4]
var socket = net.connect(80, server)
var req = ["GET " + path + " HTTP/1.1\r\n",
@meandavejustice
meandavejustice / yo.sh
Created July 15, 2014 06:09
use responsibly...
#!/bin/bash
if [ ! -t 0 ]; then
user=/dev/stdin
elif [ $1 ]; then
user=$1
else
echo "Usage: $1 [username <string>] $2 [-m msg <string>]" 1>&2; exit 1;
fi
@llkats
llkats / meatdelay.js
Created December 1, 2013 05:26
Bookmarklet to delay the submission of a meatspace chat message for a bit.
(function() {
var WAITFORIT;
// style objects for styles bc lazy
var divstyles = {
'width' : '300px',
'height' : '150px',
'backgroundColor' : '#fff',
'position' : 'fixed',
@robballou
robballou / gist:5871098
Last active December 19, 2015 00:49
Use dpq() in Drupal to write the SQL query to a file.
<?php
$query = db_select('node', 'n');
$string = dpq($query, TRUE);
dd($string);