This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
#!/usr/bin/env sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
<?php | |
/** | |
* Dot notation for access multidimensional arrays. | |
* | |
* $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]); | |
* | |
* $value = $dn->get('bar.baz.foo'); // $value == true | |
* | |
* $dn->set('bar.baz.foo', false); // ['foo'=>false] | |
* |
#!/bin/sh | |
# | |
# Change the commit and/or author date of git commits. | |
# | |
# change-date [-f] commit-to-change [branch-to-rewrite [commit-date [author-date]]] | |
# | |
# If -f is supplied it is passed to "git filter-branch". | |
# | |
# If <branch-to-rewrite> is not provided or is empty HEAD will be used. |
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
'Twas the night before Christmas, when all through the racks | |
Not a server was alerting, not even Compaqs. | |
The backups were written to tapes with care | |
In hopes that later the data would be there. | |
The machines were nestled all snug in their sleds | |
Whilst visions of vengeance danced in their heads; | |
And oncall in his three-wolf and I in my rack. | |
Had just settled down for some syn and some ack. |
#! /usr/bin/env python2 | |
# Requires: PIL, colormath | |
# | |
# Improved algorithm now automatically crops the image and uses much | |
# better color matching | |
from PIL import Image, ImageChops | |
from colormath.color_conversions import convert_color | |
from colormath.color_objects import LabColor | |
from colormath.color_objects import sRGBColor as RGBColor |
<?php | |
class SecureSessionHandler extends SessionHandler { | |
protected $key, $name, $cookie; | |
public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
{ | |
$this->key = $key; | |
$this->name = $name; |
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all. | |
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one. | |
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format | |
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files. | |
$ cd /tmp/ | |
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist . | |
$ plutil -convert xml1 com.googlecode.iterm2.plist | |
$ vi com.googlecode.iterm2.plist |