Skip to content

Instantly share code, notes, and snippets.

View dysinger's full-sized avatar
😅
16 hour days is OK. Right?

Dysinger dysinger

😅
16 hour days is OK. Right?
  • Independent
  • Nearby
View GitHub Profile
tim@r2d2:~$ cd src
tim@r2d2:~/src$ find hadoop*/src/java -type f -name *.java -exec cat {} \; | wc -l
229653
tim@r2d2:~/src$ find riak/apps/riak/src/* -type f -exec cat {} \; | wc -l
14422
tim@r2d2:~/src$ # heh
@dysinger
dysinger / ubuntu-pinning.sh
Created February 16, 2010 14:07
Shows how to pin ubuntu's erlang to the latest release 13
#!/bin/bash
sudo su -
# ubuntu
cat >/etc/apt/preferences <<EOF
Package: *
Pin: release a=lucid
Pin-Priority: -1
# Config for Nginx to act as a front-end for Riak
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc)
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_)
# Config is in /etc/nginx/sites-available/default or somewhere like that
# Set up load-balancing to send requests to all nodes in the Riak cluster
# Replace these IPs/ports with the locations of your Riak nodes
upstream riak_hosts {
server 127.0.0.1:8098;
#!/bin/bash
# ubuntu @ ec2 (canonical official ubuntu-images-us - I grabbed 64bit)
# then login as 'ubuntu' & start working - however this should be reproducable
# anywhere you have tip riak installed...
sudo perl -p -i -e 's/universe$/universe multiverse/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade -y
import XMonad
import XMonad.Config.Gnome
main = xmonad $ gnomeConfig { modMask = mod4Mask }
import XMonad
import XMonad.Config.Gnome
import XMonad.Util.Replace
main = replace >> xmonad gnomeConfig { modMask = mod4Mask }
import XMonad
-- import XMonad.Config.Gnome
import XMonad.Config.Bluetile
import XMonad.Util.Replace
-- main = replace >> xmonad gnomeConfig { modMask = mod4Mask }
main = replace >> xmonad bluetileConfig { modMask = mod4Mask }
@dysinger
dysinger / *scratch*
Created April 14, 2010 05:16
Chef-repo & Opsode Cookbooks in the same git repo
#!/bin/sh
# Demo how your can merge opscode chef-repo & cookbooks
# and perm. keep up to date with opscode cookbooks (the last "git" cmd)
% git clone git://github.com/opscode/chef-repo.git
Initialized empty Git repository in /home/tim/src/chef-repo/.git/
remote: Counting objects: 107, done.
remote: Compressing objects: 100% (99/99), done.
remote: Total 107 (delta 45), reused 0 (delta 0)
Receiving objects: 100% (107/107), 16.14 KiB, done.
Resolving deltas: 100% (45/45), done.
~ % git clone git://github.com/opscode/chef-repo.git
Initialized empty Git repository in /home/tim/chef-repo/.git/
remote: Counting objects: 107, done.
remote: Compressing objects: 100% (99/99), done.
remote: Total 107 (delta 45), reused 0 (delta 0)
Receiving objects: 100% (107/107), 16.14 KiB, done.
Resolving deltas: 100% (45/45), done.
~ % cd chef-repo
~/chef-repo % git remote add -f cookbooks git://github.com/opscode/cookbooks.git
Updating cookbooks
@dysinger
dysinger / sha1.js
Created April 18, 2010 01:15 — forked from jed/sha1.js
/* adapted by Jed Schmidt for use as a node.js module.
* the following node.js adapter code is MIT-licensed.
*
* Example usage:
*
* var sha1 = require("sha1.js"), hash;
*
* my_sha1 = sha1.hex( data );
* my_hmac_sha1 = sha1.hex( key, data );
*