Skip to content

Instantly share code, notes, and snippets.

View mcauser's full-sized avatar

Mike Causer mcauser

View GitHub Profile
@mcauser
mcauser / heroku push error
Created January 17, 2013 00:30
Received this error when trying to push to Heroku. My node.js app depends on slug 0.2.2 > unicode 0.3.1 > bufferstream 0.5.1 > buffertools 1.0.3
> [email protected] postinstall /tmp/build_26v36bla740ep/node_modules/slug/node_modules/unicode
> ./install.js
module.js:485
process.dlopen(filename, module.exports);
^
Error: /tmp/build_26v36bla740ep/node_modules/slug/node_modules/unicode/node_modules/bufferstream/node_modules/buffertools/build/Release/buffertools.node: invalid ELF header
at Object.Module._extensions..node (module.js:485:11)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
@mcauser
mcauser / gist:5250601
Created March 27, 2013 00:34
SQL Server script for exporting a table to json
--
-- Author: Thiago R. Santos
-- Create date: Aug 3rd 2008
-- Description: Returns the contents of a given table
-- in JavaScript Object Notation.
-- Params:
-- @table_name: the table to execute the query
-- @registries_per_request: equivalent to "select top N * from table"
--
-- replacing N by the actual number
@mcauser
mcauser / .wgetrc
Created October 1, 2013 06:28
.wgetrc
# ~/.wgetrc
# http://www.gnu.org/software/wget/manual/html_node/Wgetrc-Commands.html
header = Accept: */*
header = Accept-Language: en-US,en;q=0.8
header = Keep-Alive: 300
user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36
# bind_address = 202.x.x.x
# header = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
@mcauser
mcauser / mou.md
Created October 1, 2013 06:41
mou.md

Mou

Mou icon

Overview

Mou, the missing Markdown editor for web developers.

Syntax

@mcauser
mcauser / .bash_profile
Last active December 24, 2015 08:59
.bash_profile
# remove all .DS_Store files in the current directory and its subdirectories
alias rmds='find . -name .DS_Store -type f -print -delete'
# show hidden files
alias showhiddenfiles='defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder'
# hide hidden files
alias hidehiddenfiles='defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder'
# apply changes by running
@mcauser
mcauser / Sublime.md
Last active December 24, 2015 21:49
Sublime.md

Sublime Text 2 Config

Add subl cli support

ln -sf /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin
@mcauser
mcauser / Imagemagick.md
Last active December 29, 2015 15:39
Imagemagick.md

Imagemagick snippets

Thumbnails

Fit within 150x150

-strip removes colour profiles and must be before -thumbnail.

-thumbnail is an optimised version of -resize and removes image profiles.

eg. 600x300 -> 150x75

@mcauser
mcauser / Mikes.terminal
Created December 9, 2013 12:24
Mikes.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundBlur</key>
<real>0.0</real>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
@mcauser
mcauser / .gitconfig
Created December 10, 2013 15:50
.gitconfig
[user]
name = Mike Causer
email = [email protected]
[mergetool]
keepBackup = true
[credential]
helper = osxkeychain
[push]
default = simple
[core]
@mcauser
mcauser / npm global packages
Created December 11, 2013 03:28
npm global packages
# list installed
npm -g ls
# install
npm -g install bower
npm -g install express
npm -g install grunt-cli
npm -g install jshint
npm -g install jslint
npm -g install karma