Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
// 2>/dev/null; exec "`dirname "$0"`/node" "$0" "$@"
;(function () { // wrapper in case we're in module_context mode
// windows: running "npm blah" in this folder will invoke WSH, not node.
if (typeof WScript !== "undefined") {
WScript.echo("npm does not work when run\n"
+"with the Windows Scripting Host\n\n"
+"'cd' to a different directory,\n"
+"or type 'npm.cmd <args>',\n"
@nibalizer
nibalizer / gist:e83611e48cb4b0a8945d
Created February 12, 2015 21:22
gerrit-event-notifications
#!/bin/bash
username='krum-spencer'
gerrit () {
if [ $1 = "wip" ]; then
commit=`git show | grep -m1 commit | cut -d " " -f 2 2>/dev/null`
if [ -z $commit ]; then
@nibalizer
nibalizer / hpcloud_swift.py
Created February 9, 2015 02:56
Script to replace swift tempurl on hpcloud
#!/usr/bin/python
# Script to replace 'swift tempurl' on hpcloud because hpcloud is broke
# python hpcloud_swift.py GET 3600 /v1/10724706841504/craigslist/x220t.jpg $OS_ACCESS_KEY_SECRET
# https://region-b.geo-1.objects.hpcloudsvc.com/v1/10724706841504/craigslist/x220t.jpg?temp_url_sig=10724706841504:KAPYAYFHCH51B3ZCCB4W:044cefcdf58d4bccea7da3a4836145488a7c8496&temp_url_expires=1423453940
# requires OS_ACCESS_KEY_ID and OS_ACCESS_KEY_SECRET to be set
import hmac
$var = (13/4)
notify { $var: }
good
file { '/tmp/foo:
ensure => directory,
owner => root,
mode => 0777',
}
bad
in config.pp
if $cluster_config {
rabbitmq_erlang_cookie { '/path/to/cookie':
before => Service['rabbitmq'],
notify => Service['rabbitmq'],
}
Rabbitmq_erlang_cookie ['/path/to/cookie'] -> Rabbitmq_user <| |>
Rabbitmq_erlang_cookie ['/path/to/cookie'] -> Rabbitmq_vhost <| |>
# Description:
# Interact with Gerrit. (http://code.google.com/p/gerrit/)
#
# Dependencies:
#
# Configuration:
# HUBOT_GERRIT_SSH_URL
# HUBOT_GERRIT_EVENTSTREAM_ROOMS
#
# Commands:
WIFI
introduce myself
introduce the group
recognize the speakers
Anyone new to the group?
Any announcements about things comming up/hiring jobs etc?
https://www.usenix.org/conference/ucms14
http://seagl.org/
#!/bin/bash
if [ $1 = '--i-have-a-shit-ton-of-windows' ];then
extra_windows=9
fi
echo What client are you?
read client
nibz@telescope:~/projects/begpuppet/sandbox$ time wget -q http://i.imgur.com/okZWAsH.jpg?1
real 0m0.030s
user 0m0.004s
sys 0m0.000s
nibz@telescope:~/projects/begpuppet/sandbox$ time http_proxy='' wget -q http://i.imgur.com/okZWA
sH.jpg?1
real 0m0.271s
user 0m0.004s