Skip to content

Instantly share code, notes, and snippets.

Avatar

Drew Miller xer0x

View GitHub Profile
@xer0x
xer0x / olark.js
Created Oct 26, 2011
olark javascript
View olark.js
// Original snippet
function inspectObject(object) {
for (key in object) {
console.log("the attribute " + key + " is equal to " + object[key]);
}
}
var widget = new Widget();
inspectObject(widget);
View fake.txt
Okay, nobody ever actually said that Tweet.
But, Tux is a great penguin.
@xer0x
xer0x / build.js
Created Feb 9, 2012 — forked from jrburke/build.js
Doing multiple almond builds with a nodejs script, example
View build.js
//Download jquery.js and place it in the build, do not use require-jquery.js
//in the build, since each of the build layers just needs almond and not the
//full require.js file.
//This file is run in nodejs to do the build: node build.js
//Load the requirejs optimizer
var requirejs = require('./r.js');
//Set up basic config, include config that is
//common to all the requirejs.optimize() calls.
@xer0x
xer0x / hack.sh
Created Apr 23, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@xer0x
xer0x / gist:2632842
Created May 8, 2012
initial osx setup
View gist:2632842
# Pre-requisites : install XCode & Command-line tools
# Homebrew setup from: https://github.com/mxcl/homebrew/wiki/installation
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
# Check installation
brew doctor
# Do what the doctor says
sudo chown -R drew:wheel /usr/local/include /usr/local/lib
@xer0x
xer0x / mongo_pubsub.rb
Created Jun 25, 2012 — forked from octplane/mongo_pubsub.rb
Simple Pub/Sub system using MongoDB, capped collections and tailable cursors in ruby
View mongo_pubsub.rb
require 'rubygems'
require 'mongo'
module MongoPubSub
QUEUES_COLLECTION = 'queues'
class EndSubscriptionException < Exception; end
class Publisher
def initialize(queue_name, mongo_connection)
# Initialize queue collection as a capped collection
if not mongo_connection[QUEUES_COLLECTION].collection_names.include?(queue_name)
@xer0x
xer0x / index.html
Created Jun 29, 2012 — forked from enjalot/index.html
Simple Pie Chart example with D3.js
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script>
<style type="text/css">
@xer0x
xer0x / prowl.cpp
Created Nov 27, 2012 — forked from garrettreid/prowl.cpp
Updated Prowl module for ZNC
View prowl.cpp
/*
* Copyright (C) 2009 flakes @ EFNet
* New match logic by Gm4n @ freenode
* Version 1.0 (2012-08-19)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
View .simplenoterc
let g:SimplenoteUsername = "your simplenote username"
let g:SimplenotePassword = "your simplenote password"
View jpc-destroy-fraudster
#!/usr/bin/bash
#
# Copyright (c) 2011, 2012, Joyent Inc. All rights reserved.
#
# TODO http response from deleting a zone is not finding a "transition uri"
#set -o errexit
set -o pipefail
You can’t perform that action at this time.