Skip to content

Instantly share code, notes, and snippets.

View sirupsen's full-sized avatar
🐡

Simon Eskildsen sirupsen

🐡
View GitHub Profile
require 'sinatra'
require 'omniauth'
class Application < Sinatra::Base
use OmniAuth::Builder do
provider :github, 'github_id', 'github_secret'
end
get '/' do
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
#On branch search
$ git checkout -b TEMP-search
Switched to a new branch 'TEMP-search'
$ git fetch http://github.com/Sirupsen/gollum.git search
got 7ab77dbde50779f13e7b3eddad719d1fcb345e0b
...
got 144d612dd6563f71319e63b3dc5726ed9102be1c
@tmm1
tmm1 / gist:329682
Created March 11, 2010 21:31
EM Chat Server Demo
require 'rubygems'
require 'eventmachine'
require 'em-http' # gem install em-http-request
require 'yajl' # gem install yajl-ruby
class String
def bold
"\033[1m#{self}\033[0m"
end
end
@vangberg
vangberg / DWM-ON-OS-X.md
Created February 22, 2010 19:24
dwm on os x [work in progress!]

Installing and configuring dwm on OS X

  1. Install XQuartz (http://xquartz.macosforge.org) which is the development version of the X11.app that ships with OS X, which means it is way more up to date. I have had some weird issues with X11.app v. 2.3-something. XQuartz 2.5.0 fixed that.

  2. Install dwm from Homebrew, brew install dwm. This makes a bunch of necessary tweaks to the DWM configuration.

  3. Add the following script to $PATH, name it dwm-launch and chmod 755:

    cd ~
    

while true

ENV["WATCHR"] = "1"
system 'clear'
def growl(message)
growlnotify = `which growlnotify`.chomp
title = "Watchr Test Results"
image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png"
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'"
system %(#{growlnotify} #{options} &)
end