Skip to content

Instantly share code, notes, and snippets.

View guyht's full-sized avatar

Guy Halford-Thompson guyht

View GitHub Profile
<?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>
<?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>
protected $_elementDecorators = array(
'ViewHelper',
'Description',
'Errors',
array(
// Decorator name
'Callback',
// Options
array(
'callback' => function($content, $element, array $options)
<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');
@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'),
@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 / 1.js
Created December 30, 2011 19:05
var worker = new Worker('worker.js');
function init() {
document.parser = new Worker('https://raw.github.com/guyht/Giki/master/lib/gworker.js');
document.parser.onerror = function(event){
throw new Error(event.message + " (" + event.filename + ":" + event.lineno + ")");
};
document.parser.onmessage = function(event) {
document.getElementById('wiki_div').innerHTML = event.data;
};
document.parser.postMessage(document.getElementById('wiki_textarea').value);
}
@guyht
guyht / 1.js
Created December 30, 2011 19:35
Giki - Realtime, asynchronous JavaScript parser and code highlighter
<div id="bbcode_div"></div>
<textarea id="bbcode_ta" cols="20" rows="5"></textarea></pre>
Incident Identifier: A2EAC453-F4AC-4240-B364-D4E29EEBCDAD
CrashReporter Key: d80c282094567ce2b4a19bbc8aae0e3697976995
Hardware Model: iPhone3,1
Process: [APP_NAME [1037]
Path: /var/mobile/Applications/71A84C67-8919-42FC-B3B2-55EAA143D757/[APP_NAME.app/[APP_NAME
Identifier: [APP_NAME
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]