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
has_many :unread_messages,
:class_name => 'Message',
:foreign_key => :to_id,
:conditions => { :to_deleted => false, :unread => true },
:group => :source_id
#!/usr/bin/env perl
# Copyright (C) 2006, Shawn Pearce <spearce@spearce.org>
# This file is licensed under the GPL v2, or a later version
# at the discretion of Linus.
package Git;
sub remote_refs {
my ($self, $repo, $groups, $refglobs) = _maybe_self(@_);
my @args;
if (ref $groups eq 'ARRAY') {
@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!')
#!/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 / 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
// ==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) {
@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)