Skip to content

Instantly share code, notes, and snippets.

View pjhyett's full-sized avatar

PJ Hyett pjhyett

View GitHub Profile
struct tauto {
int sb;
char pro[30];
char mod[30];
int god;
} auto;
struct stack {
int sb[21];
char pro[21][30];
I would like to propose moving support for the PulseAudio sound server into Arch Linux proper. This would also be in preparation for the eventual arrival of Gnome 3, since it will be unlikely we can effectively maintain the needed GStreamer patch any more.
To that effect I have created a plan:
---
To provide PulseAudio in [extra]...
Move the following packages from [community] to [extra]:
- libasyncns
// ==UserScript==//
// @name Kottke Blue Border Remover
// @namespace http://gist.github.com/49129
// @description Gets rid of that annoying blue border wrapping kottke.org
// @include http://*.kottke.org
// @include http://*.kottke.org/*
// ==/UserScript==
var els = ['t', 'b', 'l', 'r', 'tl', 'tr', 'bl', 'br']
for(var i in els) {
#!/usr/local/bin/macruby
##
# Remove any duplicate tracks in iTunes
# PJ Hyett was here 11/2008
framework "Cocoa"
framework "ScriptingBridge"
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.iTunes")
@pjhyett
pjhyett / github-test.rb
Created October 11, 2008 04:50 — forked from webmat/github-test.rb
Simulation script for building a gem on GitHub
#!/usr/bin/env ruby
require 'yaml'
if ARGV.size < 1
puts "Usage: github-test.rb my-project.gemspec"
exit
end
require 'rubygems/specification'
data = File.read(ARGV[0])
@pjhyett
pjhyett / server.rb
Created October 23, 2008 01:42 — forked from bmizerany/server.rb
require 'rubygems'
require 'mq'
require 'json'
EM.run do
AMQP.start(:vhost => '/heroku',
:user => 'face',
:pass => 'thisisheroku!')
@pjhyett
pjhyett / gist:49705
Created January 20, 2009 22:34 — forked from eltiare/gist:49680
chars = ('A'..'Z').to_a + ('a'..'z').to_a + ('0'..'9').to_a
str = chars.sort_by { rand }.first(50)
@pjhyett
pjhyett / gist:29940
Created November 28, 2008 07:57 — forked from dhh/gist:29752
config.action_controller.asset_host = Proc.new do |source, request|
non_ssl_host = "http://asset#{source.hash % 4}.backpackit.com"
ssl_host = "https://asset1.backpackit.com"
if request.ssl?
case
when source =~ /\.js$/
ssl_host
when request.headers["USER_AGENT"] =~ /(Safari)/
non_ssl_host
alias gb='for k in `git branch|perl -pe s/^..//`;do echo -e `git show --pretty=format:"%Cblue%cr%Creset" $k|head -n 1`\\t$k;done'
# Output
# ------
# ~/Development/github(master)$ gb
# 4 weeks ago config-gem
# 9 days ago dropdown
# 5 weeks ago faucet
# 3 weeks ago health
lines = `git log --oneline`.split("\n")
lines.map! do |line|
sha, *msg = line.split
msg = msg.join(' ') # unused
color = '#' + sha[0..-2]
%{<div class="box" style="background:#{color}"></div>}
end
File.open('colors.html', 'w') do |f|
f.puts <<-HTML