Skip to content

Instantly share code, notes, and snippets.

Learning me some Golang

Colin O'Dell colinodell

Learning me some Golang
Block or report user

Report or block colinodell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
colinodell / .gitignore
Last active Mar 13, 2017
Standard Magento .gitignore
View .gitignore
# Don't include any temporary files and other unimportant things
colinodell / checker.php
Created Oct 24, 2014
Google Inbox invite checker
View checker.php
$last = '';
while (true) {
$json = file_get_contents(''.rand(1,500));
$json = json_decode($json, true);
$comment = $json[1]['data']['children'][0];
$msg = $comment['data']['author'] . ' - ' . $comment['data']['body'] . "\n";
if ($msg != $last) {

Keybase proof

I hereby claim:

  • I am colinodell on github.
  • I am colinodell ( on keybase.
  • I have a public key whose fingerprint is 8FBC 987A 0483 128A C055 E483 60A4 DAD2 72A0 1CB8

To claim this, I am signing this object:

View console.js
// Super-simple console script to push the button only when the timer gets low
var h;
var armed = false;
var lowestSoFar = 9999999999;
h = setInterval(function() {
if (r.thebutton._msLeft <= 0) {
console.log('Game over :-/');
View rateLimit.js
// Returns a function that won't fire more than
// once every `wait` milliseconds.
// Example usage:
// $('.button').click(rateLimit(function(){
// console.log('clicked!');
// }));
function rateLimit(func, wait) {
colinodell / AbstractEnum.php
Created Aug 18, 2015
Enum-like class for PHP
View AbstractEnum.php
* Base class used to build enums
abstract class AbstractEnum
* @var array Options array, suitable for a select box
colinodell /
Created Aug 20, 2015
Create Drupal upgrade patches
# A sample script for batch-creating multiple patches at once
# Generate 6.x patches
for i in `seq 0 36`
./ 6.$i 6.37
# Generate 7.x patches
colinodell / services.yml
Created Aug 20, 2015
Guzzle with logger
View services.yml
class: Guzzle\Http\Client
- [addSubscriber, ["@guzzle.logger"]]
class: Guzzle\Log\MonologLogAdapter
- "@logger"
colinodell / portVarKeywords.php
Last active Sep 28, 2016 — forked from nikic/portAlternativeTags.php
Tool for changing "var" keywords to "public" in PHP
View portVarKeywords.php
* Note: This script will directly modify the .php files in the given directory.
* It is assumed that the code is under version control, so you can easily review
* the changes using `git diff` or similar.
function usageError() {
die("Usage: php portVarKeywords.php dir/\n");
colinodell / ParagraphDirProcessor.php
Created Mar 10, 2016
Adding 'dir' attribute to all paragraphs (UNTESTED)
View ParagraphDirProcessor.php
// TODO: Set your "namespace" and "use" statements here
// Also see this documentation:
class ParagraphDirProcessor implements DocumentProcessorInterface
public function processDocument(Document $document)
$walker = $document->walker();
You can’t perform that action at this time.