Dave Hulbert dave1010

View bamboo-install.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
 
# bamboo
mkdir /opt/atlassian
wget -O /opt/atlassian/bamboo.tar.gz http://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-5.1.1.tar.gz
cd /opt/atlassian
tar xzf bamboo.tar.gz
mv atlassian* bamboo
 
mkdir /home/bamboo
View README.md

Base are looking to hire an awesome Midweight Front-end Developer

Here's a quick test to make sure you really are awesome.

  1. Create a HTML page: left half a Google Map, right half a donut chart
  2. Get the JSON(P) data from http://api.opendevicelab.com/?countries=United%20Kingdom
  3. add all the device labs' locations as markers on the Google Map
  4. sum up all the brands_available values and show as percentages on the donut chart (eg 20 labs with Apple devices, out of a total of 50 brands_available values = 40%)

Bonus points:

View continuous-integration-server.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
 
# watches for modified files in current directory (".") and "../src"
# runs phpunit when things change
# also requires inotify-tools
# make by dave1010. WTFPL
 
# future:
# * just use a real CI server
# * better email notifications
View template.php
1 2 3 4 5 6 7 8 9 10
function template($string, $replace){
$keys = array_map(function($k) {
return '{'.$k.'}';
}, array_keys($replace));
$vals = array_values($replace);
return str_replace($keys, $vals, $string);
}
 
 
echo tempate("Hello {name}, today is {weather}!", array(
View placeholder.js
1 2 3 4 5 6 7 8 9 10
if (!Modernizr.input.placeholder) {
// Old IE doesn't support the placeholder attribute on <input>
// TODO: placeholder colour and remove when submitting form
$(function() {
$('input[placeholder]').each(function() {
var ths = $(this), placeholder = ths.attr('placeholder');
if (!ths.val()) {
ths.val(placeholder);
}
ths.focus(function() {
View jquery.blink.js
1 2 3 4 5 6 7 8 9 10
View gist:3135160
1 2 3 4 5 6 7 8 9 10
$ ack --php 'class [\w]+'|grep -v '//'|grep -v '*'|grep -v '>'|sed 's/.*class //'|sed 's/ .*//'
WP_Widget
WP_Widget_Factory
WP_Embed
Moxiecode_JSONReader
Moxiecode_JSON
Moxiecode_Logger
GoogleSpell
PSpell
SpellChecker
View DatabaseAdapterInterface.php
1 2 3 4 5 6 7 8 9
<?php
 
interface DatabaseAdapterInterface
{
public function connect();
public function disconnect();
 
public function prepare($sql, array $options = array());
public function execute(array $parameters = array());
View jquery.log.js
1 2 3 4 5 6 7 8 9 10
/*!
* jQuery Console Logger v1.0
*
* Copyright 2012, Dave Hulbert
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Usage: add ".log()" inline in a jQuery chain
* $('div').parent().parent().log().find('span').next().log();
*/
jQuery.fn.log = function() {
View htaccess
1 2 3 4 5 6 7 8 9 10
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
 
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
 
# Usage: copy save this file as .htaccess or add it to your httpd.conf
 
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'
Something went wrong with that request. Please try again.