Skip to content

Instantly share code, notes, and snippets.

theothermattm / node-stream-transform.js
Created Jan 30, 2014
Simple node.js app that transforms a pages content using streams. Uses npm request and npm express. http://localhost:3000/replace?url=
View node-stream-transform.js
var express = require('express');
var app = express();
app.get('/replace', function(req, res) {
var request = require('request');
var stream = require('stream');
var zlib = require('zlib');
var url = req.query.url;
theothermattm / gist:8707598
Created Jan 30, 2014
Command line to change the git:// protocol to https:// for those behind a corporate firewall
View gist:8707598
git config --global url."https://".insteadOf git://
theothermattm / gist:8743170
Created Jan 31, 2014
Get Oracle database name in a sql scrip
View gist:8743170
select sys_context('userenv','db_name') from dual;
theothermattm / gist:8740850
Last active Aug 29, 2015
Find out current octal permissions of a file for chmod-ing
View gist:8740850
# linux
stat -c %a FILE
# OS X
stat -f "%OLp" FILENAME
theothermattm / gist:8793406
Created Feb 3, 2014
List java home directories on OS X
View gist:8793406
/usr/libexec/java_home -V
theothermattm / gist:8827142
Created Feb 5, 2014
Recursively delete .svn folders
View gist:8827142
find . -name .svn | xargs rm -rf
theothermattm / gist:8863331
Created Feb 7, 2014
Effective SublimeText Vintage Configuration
View gist:8863331
// in default settings
// make sure this happens so vintage mode is enabled
"ignored_packages": []
// in user settings
// start in command mode instead of edit mode
"vintage_start_in_command_mode": true,
theothermattm / .vimrc
Last active Aug 29, 2015
My .vimrc file
View .vimrc
" A lot of this comes from
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
"filetype off
filetype plugin indent on
theothermattm /
Last active Aug 29, 2015
Personal Mac Setup Steps
theothermattm / private.xml
Created Mar 17, 2014
Karibiner (aka KeyRemap4MacBook) mapping file
View private.xml
<?xml version="1.0"?>
<!-- key modifier file for -->