Skip to content

Instantly share code, notes, and snippets.

View danielcbaldwin's full-sized avatar

Daniel Baldwin danielcbaldwin

View GitHub Profile
@josegonzalez
josegonzalez / category.rb
Created August 14, 2010 21:41
Category plugin for Jekyll
module Jekyll
class CategoryIndex < Page
def initialize(site, base, dir, category)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
@laserlemon
laserlemon / Rails 2 Environment
Created October 1, 2010 12:11
Snow Leopard, Homebrew, Git, RVM, Ruby, Passenger, Apache, MySQL, Memcached and ImageMagick
# 2010-10-01
#
# Mac OS X 10.6.3
# Homebrew 0.7
# Xcode 3.2.4
# Git 1.7.3.1
# RVM 1.0.12
# Ruby 1.8.7, 1.9.2
# Passenger 2.2.15
# MySQL 5.1.49
@bulljit
bulljit / tranmissionIphone.sh
Created January 23, 2011 00:16
Transmission-Daemon Script: Notify Iphone of completed torrent via Prowl
#!/bin/sh
curl -k https://prowl.weks.net/publicapi/add -F apikey=[replace with your growl API key] -F priority=-1 -F application="Transmission" -F description="$TR_TORRENT_NAME completed on $TR_TIME_LOCALTIME"
# /bin/curl -k -F apikey=[your Prowl API key here] -F application=Transmission -F event="Download Complete" -F description="$TR_TORRENT_NAME completed on $TR_TIME_LOCALTIME" https://api.prowlapp.com/publicapi/add
@BinaryMuse
BinaryMuse / gist_tag.rb
Created January 31, 2011 00:44
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@nzjrs
nzjrs / skype-notify.py
Created June 3, 2011 13:14
Python script to make Skype co-operate with GNOME3 notifications
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
#
#
# Copyright (c) 2011, John Stowers
#
# Adapted from skype-notify.py
# Copyright (c) 2009, Lightbreeze
#
#
@aredridel
aredridel / reader.js
Created June 8, 2011 07:23
Read from a stream: works with a FIFO.
var fs = require('fs')
var s = fs.createReadStream('x')
s.on('data', function(b) { console.log(b) })
@anolson
anolson / log_producer.rb
Created November 10, 2011 21:53
Log streaming in ruby.
class LogProducer
attr_accessor :streams
def initialize(options = {})
@streams = Hash.new
@filename = options[:filename]
add_stream(options[:stream])
end
@reid
reid / remote.md
Created December 31, 2011 17:37
Garage door opener with Arduino

iPhone Garage Remote

Instead of buying two door remotes, I bought one and control it with my iPhone.

Parts

First, I stole nearly everything from MyDoorOpener.com. Their version uses parts I could not find and requires a $6 iPhone app. Let's improve on that.

Almost everything can be found at RadioShack.

@marciobarrios
marciobarrios / dabblet.css
Created January 4, 2012 09:27 — forked from anonymous/dabblet.css
iOS Native App Default Style implemented in CSS
/* iOS Native App Default Style implemented in CSS */
/* Bootstrapping … */
* {
margin: 0;
padding: 0;
font-size: inherit;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts