Skip to content

Instantly share code, notes, and snippets.

View grahamc's full-sized avatar
❄️

Graham Christensen grahamc

❄️
View GitHub Profile
#!/usr/bin/env bash
# build and install GCC toolchain for MSP430
#
# prerequisites
# - bash
# - wget, GNU patch, GNU make
# - things needed to build binutils, GCC and GDB
#
# environment
remote_file "/tmp/elasticsearch-#{node[:elasticsearch][:version]}.tar.gz" do
source "http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-#{node['elasticsearch']['version']}.tar.gz"
mode "0644"
checksum node[:elasticsearch][:checksum]
not_if{ File.exists? "#{node[:elasticsearch][:install_dir]}/bin/elasticsearch" }
end
bash "gunzip elasticsearch" do
user "elasticsearch"
cwd "/tmp"
#include <stdio.h>
#include <string.h>
int main ()
{
char str[] = "HTTP/1.1 200 OK\r\nDate: Thu, 09 Aug 2012 03:05:02 GMT\r\n\r\nBattery,2012-08-07T05:11:41.577805Z,10096\r\nHumidity,2012-08-08T01:31:28.529949Z,53.37";
char * pch;
pch = strstr(str, "\r\n\r\n");
pch += 4; // Move ahead 4 bytes
git clone git://github.com/monsieurvideo/get-flash-videos.git
git clone git://gitorious.org/get-flash-videos-plugins/gfv-plugins.git
sudo perl -MCPAN -e shell
install Bundle::CPAN
install WWW::Mechanize
install Crypt::Rijndael
width = 75;
thick = 10;
depth = 3;
brace_height = 20;
screw_radius = 2;
screw_margin = 3;
union(){
rotate(90, [1, 0, 0]) {
import sys, site, os
_dir = os.path.basename(os.path.abspath(__file__))
site.addsitedir(_dir + '/venv/lib/python2.7/site-packages/')
prev_sys_path = list(sys.path)
new_sys_path = [_dir]
<VirtualHost *:80>
ServerName pillcaller.com
WSGIDaemonProcess pillcaller user=gchristensen group=gchristensen threads=5
WSGIScriptAlias / /home/gchristensen/pill/pillcaller.wsgi
<Directory /home/gchristensen/pill>
WSGIProcessGroup pillcaller
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
<?php
ini_set('date.timezone', 'America/New_York');
$startDate = new DateTime('@100');
$oneSecondInterval = new DateInterval('PT1S');
$startDate->add($oneSecondInterval);
$diff = $startDate->getTimestamp() - 100;
#!/bin/bash
VS="5.3.6 5.3.7 5.3.8 5.3.9 5.3.10 5.3.11 5.3.12"
for version in $VS
do
mkdir "test-${version}"
cd "test-${version}"
wget "http://www.php.net/get/php-${version?}.tar.gz/from/this/mirror"
Mac OS X
OS Version PHP Version Actual Expected