Skip to content

Instantly share code, notes, and snippets.

View christianchristensen's full-sized avatar

Chris Christensen christianchristensen

View GitHub Profile
@christianchristensen
christianchristensen / 5.3.13custom
Created October 19, 2012 22:06
Custom php-build definition to include php-fpm
configure_option "--with-fpm"
configure_option "--enable-fpm"
configure_option "--with-apc"
configure_option "--enable-apc"
install_package "http://www.php.net/distributions/php-5.3.13.tar.bz2"
install_pyrus
install_xdebug "2.2.0"
@christianchristensen
christianchristensen / compactindex.php
Created October 8, 2012 01:10
Create an index output from Wikipedia_stuff.pdf
#!/usr/bin/env php
<?php
$words = array();
while ($line = fgets(STDIN)) {
$word = explode("-", $line);
$words[$word[0]][] = trim($word[1]);
}
foreach ( $words as $word => $pages ) {
@christianchristensen
christianchristensen / puppet-git-receiver-install
Created September 4, 2012 02:44 — forked from johnl/brightbox cloud example
puppet-git-receiver cloud-config install script
#cloud-config
apt_sources:
- source: "ppa:brightbox/puppet"
packages:
- puppet-git-receiver
- rubygems
runcmd:
- cp -ar /home/ubuntu/.ssh /var/lib/puppet-git-receiver/
- chown -R puppet-git.puppet-git /var/lib/puppet-git-receiver/.ssh
- gem install librarian-puppet --no-ri --no-rdoc
@christianchristensen
christianchristensen / puppet_bootstrap_deploy.md
Created September 3, 2012 18:54
Puppet bootstap and deploy research
@christianchristensen
christianchristensen / .htaccess
Created August 21, 2012 02:21
Silex PHP simple app rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/app
RewriteRule ^(/?)(.*) /app/$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ app/index.php [L]
</IfModule>
@christianchristensen
christianchristensen / x120e_volume.sh
Created August 11, 2012 19:29
Volume control script for x120e laptop
#!/bin/sh
# Originally from: http://ubuntuforums.org/showthread.php?p=8247224#post8247224
# amixer options
mute_switch="Master" # For Asus EEE, this is iSpeaker
channel="Master" # usually Master. You can set this to PCM to keep headphone volume unchanged.
card=1;
VOL_STEP=2 # amount to increase / decrease volume
# osd_cat options
POS=bottom # top, middle or bottom