Skip to content

Instantly share code, notes, and snippets.

View NickTomlin's full-sized avatar
📚
Reading a book

Nick Tomlin NickTomlin

📚
Reading a book
View GitHub Profile

This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)

You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)

If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.

Note that this is not specific to Rails projects. This can work for any standalone front-end project.

Instructions

@NickTomlin
NickTomlin / python3.sublime-build
Created April 8, 2013 21:43
Build python files via Python3 in Sublime Text 2
{
"cmd": ["python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
var http = require('http');
var url = require('url');
function start(route,handle) {
function onRequest(request,response){
var postData = "";
var pathname = url.parse(request.url).pathname;
console.log("Request for " + pathname + " received");
@NickTomlin
NickTomlin / gist:4164193
Created November 28, 2012 20:36
Bash Parameter exercises
#!/bin/bash
# see http://www.ibm.com/developerworks/library/l-bash-parameters/index.html
testfunc ()
{
echo "$# parameters";
echo "{$1:}";
# if [ $1 = "@*" ]
# then
# echo "it's an @"
# exit
@NickTomlin
NickTomlin / gist:4002891
Created November 2, 2012 17:20
Faster key rate for mac os x
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0
[from](https://github.com/mathiasbynens/dotfiles/blob/master/.osx)
@NickTomlin
NickTomlin / gist:3920091
Created October 19, 2012 19:12
Photoshop CheatSheet

Photoshop CheatSheet

Because I am too lazy to google for these things, and muscle memory is the first step to true knowledge


Misc.

alt + cmd : direct select a layer

alt + cmd + c : resize canvas

@NickTomlin
NickTomlin / typekit_init.php
Created October 18, 2012 17:02
Including Typekit in WP Head
// include typekit
function typekit_init(){?>
<script type="text/javascript" src="//use.typekit.net/TYPEKITIDHERE.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<?}
add_action('wp_head', 'typekit_init');
@NickTomlin
NickTomlin / programatic.php
Created October 10, 2012 21:24
Programatic node creation in Drupal 7
<?php
/* ==========================================================================
Bootstrap Drupal
========================================================================== */
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@NickTomlin
NickTomlin / Recipes.md
Created October 4, 2012 17:02
Terminal Cheatsheet
@NickTomlin
NickTomlin / dabblet.css
Created June 13, 2012 23:45
Skeleton playground
/**
* Skeleton playground
*/
/*
* Skeleton V1.1
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php