Skip to content

Instantly share code, notes, and snippets.

View jmshal's full-sized avatar

Jacob Marshall jmshal

  • New Zealand
View GitHub Profile
@jmshal
jmshal / better-nodejs-require-paths.md
Created November 14, 2015 00:43 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@jmshal
jmshal / boo_watching.md
Created September 28, 2015 22:25
boo_watching.md

HI HERE ARE SOME DOG HALP *** SORRY HE IS SO GODDAMN DIRTY ***

Boo Sitting (March 15-19th) 15th: Afternoon/PM 16th: AM/Afternoon/PM 17th: AM/PM 18th: AM/PM 19th: AM/PM

@jmshal
jmshal / rd.md
Last active August 29, 2015 14:10 — forked from diego898/rd.md

thanks to @neurodyne and this link for updated instructions

This works with the following versions of termsrv.dll

x64 - termsrv.dll - 6.3.9600.17095

Find Replace
39813C0600000F849E310500 B80001000089813806000090
090085C07F078BD8 090085C090908BD8
// Created by Max Luster (@maxluster)
// Usage instructions at https://bugsnag.com/blog/responsive-typography-with-chained-media-queries
// Requires SASS >= 3.3
// Enhanced by Breakpoint 2.4.x and Compass 1.0 (alpha)
// For SASS 3.2.x support, use https://gist.github.com/maxluster/c9ecc6e4a6770e507c2c
// Provides a simplified syntax for chaining media queries across named or numeric breakpoints
@mixin responsive($properties, $default-value, $responsive-values){
// No named breakpoints by default
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
/**
* Read the value of a header in the current document.
*
* This uses a [single] XMLHTTPRequest to do a HEAD of the current document
* and fetch HTTP response header values. Note that the implementation is
* rather stupid in that it spins waiting for the XMLHTTPRequest to complete
* if it hasn't been called yet.
*
* @param name string
@jmshal
jmshal / commands.sh
Created January 16, 2014 22:14 — forked from raultm/commands.sh
# Source : http://thezinx.com/2013/10/29/create-bootable-dmg-iso-mavericks-app.html
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks
# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Mavericks.sparseimage