Skip to content

Instantly share code, notes, and snippets.

View wildlyinaccurate's full-sized avatar
🐕‍🦺

Joseph Wynn wildlyinaccurate

🐕‍🦺
View GitHub Profile
@wildlyinaccurate
wildlyinaccurate / event.js
Last active February 12, 2021 01:05
Really simple Javascript custom event system
var Event = function() {
var self = this;
self.queue = {};
self.fired = [];
return {
fire: function(event) {
@wildlyinaccurate
wildlyinaccurate / queue.js
Created July 18, 2012 19:57
Really simple Javascript queueing system
var Queue = function() {
var isInit = false;
var queue = [];
return {
onInit: function(callback) {
if (isInit) {
callback();
@wildlyinaccurate
wildlyinaccurate / AccountControllerTest.php
Created July 9, 2012 22:00
Laravel Controller Test Case
<?php
require_once 'ControllerTestCase.php';
class AccountControllerTest extends ControllerTestCase
{
public function testSignupWithNoDataRedirectsAndHasErrors()
{
$response = $this->post('account@signup', array());
@wildlyinaccurate
wildlyinaccurate / recursive_array_search.php
Created April 23, 2012 21:39
PHP Recursive Array Search
<?php
/**
* Recursively search an array for a given value. Returns the root element key if $needle
* is found, or FALSE if $needle cannot be found.
*
* @param mixed $needle
* @param array $haystack
* @param bool $strict
* @return mixed|bool
@wildlyinaccurate
wildlyinaccurate / Git.md
Created October 24, 2011 06:53
A comparison of Git and SVN. Or, why you should switch to Git.
   	                                	  ,ad8888ba,   88           
                                   		d8"'    `"8b  ""    ,d     
                                   		d8'                  88     
                                   		88             88  MM88MMM  
                                   		88      88888  88    88     
                                   		Y8,        88  88    88     
                                   		 Y8a.    .a88  88    88,    
                                   		  `"Y88888P"   88    "Y888