I hereby claim:
- I am cmattoon on github.
- I am cmattoon (https://keybase.io/cmattoon) on keybase.
- I have a public key whose fingerprint is ED86 EBAE C5E7 6272 F3EB 2897 2645 4202 36A6 F479
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* Reads a directory and outputs an <img> tag for each *.jpg | |
* file it finds. | |
*/ | |
$slides = array_map(function($fname) { | |
$src = "img/slides/anatomy/" . basename($fname); | |
return "<img src=\"{$src}\" class=\"slide\">"; | |
}, array_filter(scandir($dir), function($path) { | |
return (bool)(strpos($path, '.jpg')); |
#!/bin/bash | |
docker rm $(docker ps --no-trunc -aq) | |
docker rmi $(docker images -q --filter "dangling=true") |
/** | |
* Example Asynchronous Module Definition (AMD) | |
* | |
* | |
*/ | |
define(['jquery', 'console'], function($, console) { | |
"use strict"; | |
var my_private_var = 'This value is private'; | |
function my_private_method() { |
# git rm all those temp files from your new repo | |
# Did you forget to add a .gitignore? | |
find . -name '*~' | xargs git rm -f |
## Some useful git aliases | |
## To apply aliases globally (for all repos on your computer), copy into ~/.gitconfig | |
## To add an alias to one repository only, add it to /path/to/repo/.git/config | |
## | |
## ALIASES THAT MENTION BRANCH/ORIGIN NAMES ('master', 'develop', 'origin', 'upstream') should be | |
## double-checked before adding to anything other than our repos, since these are relative terms. | |
## If you create a new repo, for example, that doesn't have a 'develop' branch, or 'origin' is not what | |
## you expect, it can mess things up. Most of them are safe for general use though. | |
## |
<?php | |
ini_set('display_errors', true); | |
error_reporting(E_ALL); | |
class NotImplementedException extends BadMethodCallException { | |
public function __construct($message = null, $code = 0, $previous = null) { | |
parent::__construct($message, $code, $previous); | |
$this->message = "Method '{$message}' not implemented"; | |
} |
#!/usr/bin/env python | |
from string import ascii_lowercase | |
def sum_list(values, ignore_invalid=True): | |
"""Returns the sum of a list of values. | |
String representations of integers ('0'-'9') are added at their | |
integer value, but letters have a value between 1-26. | |
(a=1, b=2, c=3, ...) | |
""" | |
total = 0 |
#!/usr/bin/perl -w | |
# Found at: http://www.ouah.org/RevEng/code/disasm.pl.txt | |
# Disasm.pl v0.4 | |
#Assumes that the file we're working with is stripped | |
#TODO: | |
# 0. Sort NUMERICALLY on function call names, not lexographically | |
# 1. Get this to work if symbols are present | |
# 2. Add options or speed up the finding of unused functions (can we do it | |
# without an extra pass?) |