Skip to content

Instantly share code, notes, and snippets.

View guyht's full-sized avatar

Guy Halford-Thompson guyht

View GitHub Profile
@guyht
guyht / 1.js
Created December 30, 2011 19:05
var worker = new Worker('worker.js');
@guyht
guyht / C++
Created July 1, 2011 17:02
SHA1 test
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <vector>
#include <openssl/sha.h>
using namespace std;
int main()
{
@guyht
guyht / gist:1012516
Created June 7, 2011 15:42
JSHint through NodeJS
#!/usr/bin/env node
/*
* Takes a list of files and runs them through JSHint
*
* Usage:
* check.js file1 file2 file3
*/
var fs = require('fs'),
<form id="my-form">
<input type="text" name="in" value="some data" />
<button type="submit">Go</button>
</form>
<script>
// Should only be triggered on first page load
alert('ho');
protected $_elementDecorators = array(
'ViewHelper',
'Description',
'Errors',
array(
// Decorator name
'Callback',
// Options
array(
'callback' => function($content, $element, array $options)
<?xml version="1.0" encoding="UTF-8"?>
<project name="ghtlib" default="build" basedir=".">
<target name="build" depends="checkout,php-documentor,php-codesniffer,phpunit" />
<target name="checkout">
<exec executable="git" dir="${basedir}/source">
<arg line="pull master origin" />
</exec>
</target>
<?xml version="1.0" encoding="UTF-8"?>
<cruisecontrol>
<project name="ghtlib" buildafterfailed="false">
<modificationset>
<alwaysbuild/>
</modificationset>
<schedule interval="60">
<ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml"/>
</schedule>