Skip to content

Instantly share code, notes, and snippets.

View funkatron's full-sized avatar

Ed Finkler funkatron

View GitHub Profile
<?php
// Anonymous function (Closure object)
$foo = function () {
echo '';
};
// procedural function
function foo()
{
{
"require": {
"slim/slim": "2.*",
"slim/views": "0.1.*",
"twig/twig": "1.15.0",
"monolog/monolog": "1.7.0",
"resty/resty": "0.6.0",
"vlucas/valitron": "dev-master#e011ab81c43903e73b766620828877b828e65380",
"j4mie/idiorm": "v1.4.1",
"j4mie/paris": "v1.4.2",
@funkatron
funkatron / thing
Created April 2, 2014 14:05
Christ almighty.
### Keybase proof
I hereby claim:
* I am funkatron on github.
* I am funkatron (https://keybase.io/funkatron) on keybase.
* I have a public key whose fingerprint is 9F95 49E3 BFDB 3E7C 1488 8E25 B471 C9A1 0426 CBCC
To claim this, I am signing this object:
body {
font-family: "Pet Me", monospace;
font-size: .9em;
}
.color_block {
float:left; width:100px; height:100px; padding:10px;
}
{
"_id": {
"$oid": "5160756b96cc62079cc2db15"
},
"name": "Drop Biscuits and Sausage Gravy",
"ingredients": "Biscuits\n3 cups All-purpose Flour\n2 Tablespoons Baking Powder\n1/2 teaspoon Salt\n1-1/2 stick (3/4 Cup) Cold Butter, Cut Into Pieces\n1-1/4 cup Butermilk\n SAUSAGE GRAVY\n1 pound Breakfast Sausage, Hot Or Mild\n1/3 cup All-purpose Flour\n4 cups Whole Milk\n1/2 teaspoon Seasoned Salt\n2 teaspoons Black Pepper, More To Taste",
"url": "http://thepioneerwoman.com/cooking/2013/03/drop-biscuits-and-sausage-gravy/",
"image": "http://static.thepioneerwoman.com/cooking/files/2013/03/bisgrav.jpg",
"ts": {
"$date": 1365276011104
@funkatron
funkatron / devhell
Last active August 29, 2015 14:03
encoding commands for /dev/hell
# mono
lame -m m --abr 64 devhell_ep47.aif devhell_ep47.mp3
#stereo
lame --abr 128 ep47.aif ep47.mp3
@funkatron
funkatron / get_process_ports.bash
Created September 1, 2014 16:56
Find processes and ports they are using in OS X
lsof -Pnl +M -i4
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto
@funkatron
funkatron / gist:6809c147256601b283a5
Last active August 29, 2015 14:22
PHP step debugging outside the browser using XDebug, PHPStorm, the PHP dev server and httpie

Stuff I did to debug during API dev on my local machine

Run the PHP dev server on your given port

php -S 0.0.0.0:8080 -t public public/index.php

In httpie, pass ?XDEBUG_SESSION_START=foobar on the query string with the request