Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View funkatron's full-sized avatar

Ed Finkler funkatron

View GitHub Profile
@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
@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
{
"_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
body {
font-family: "Pet Me", monospace;
font-size: .9em;
}
.color_block {
float:left; width:100px; height:100px; padding:10px;
}
@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:
@funkatron
funkatron / xdebug_codebug_setup.txt
Last active September 8, 2016 19:21
Settings for XDebug and Codebug so PHP debugging actually fucking works
Codebug config======================
Paths
LOCAL REMOTE
/local/path/to/php/app /server/path/to/php/app
xdebug config=======================
root@ed:/vagrant/projects/acp/frontend/app# more /etc/php5/fpm/conf.d/20-xdebug.ini
; configuration for php xdebug module
{
"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",
<?php
// Anonymous function (Closure object)
$foo = function () {
echo '';
};
// procedural function
function foo()
{
good design is intuitive
and you have no intuition without empathy
@funkatron
funkatron / openemu_single_file_archives.md
Created January 6, 2014 00:45
converting 7zip files with multiple ROMs to individual files for OpenEmu usage

I use Homebrew for package management, so the instructions here work with that. You could probably get p7zip and atool another way if you want.

  1. install p7zip with homebrew: brew install p7zip
  2. install atool with homebrew: brew install atool
  3. extract individual files from .7z archives to current directory: atool -X . -e -E *.7z
  4. delete or move the .7z files: rm *.7z
  5. archive each file into its own ZIP archive using find and atool: find . -d 1 -type f -exec atool -a -F 7z -E -e {} ';'
  6. delete the uncompressed rom files. They should have a common file extension, which you'll need to change depending on the ROM type. For example, I needed to delete a bunch of .gb and .gbc files: rm *.gb; rm *.gbc