Skip to content

Instantly share code, notes, and snippets.

View sengertwd's full-sized avatar

Scott Engert sengertwd

View GitHub Profile
@sengertwd
sengertwd / reset.css
Created September 7, 2014 19:11
This is a set of resets that I created in order to be used with codepen.
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html,
body {
font-family: sans-serif;
margin: 0;
@sengertwd
sengertwd / provision.sh
Created January 29, 2014 07:04
This is my vagrant provision bash script
echo "This is our provisioning script"
apt-get update
apt-get install -y python-software-properties python g++ make
add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install -y nodejs
npm install -g grunt-cli
@sengertwd
sengertwd / .bashrc
Created January 17, 2014 21:32
My bashrc file that I use
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@sengertwd
sengertwd / jq.event.sublime-snippet
Created January 17, 2014 16:49
Sublime Text Snippet for quickly adding an event to an element(s) Instructions: * Install snippet * type 'jqev' * press tab * put jQuery selector * press tab * put the event type * press tab * if you need the event type the event * press tab * put code to run when the event fires
<snippet>
<content><![CDATA[
\$("$1").on("$2", function($3){
$4
});
]]></content>
<tabTrigger>jqev</tabTrigger>
</snippet>
@sengertwd
sengertwd / jq.select.sublime-snippet
Last active January 3, 2016 14:29
Sublime Text Snippet for jquery selector Instructions: * Install snippet * in a JavaScript line type 'jqsel' * press tab * put jQuery select in * press tab again * add jQuery methods
<snippet>
<content><![CDATA[
\$("$1").$2
]]></content>
<tabTrigger>jqsel</tabTrigger>
</snippet>
@sengertwd
sengertwd / cfreturn-ajax.sublime-snippet
Created January 16, 2014 22:14
Allows you to quickly get a cfreturn from a cold fusion function Instuctions: * Put snippent in snippets * type "cfreturn-ajax" * press tab
<snippet>
<content><![CDATA[
<cfreturn '{"statuscode":"${1}","statustext":"${2}"}' />
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cfreturn-ajax</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@sengertwd
sengertwd / js.ready.sublime-snippet
Created January 16, 2014 19:12
jquery ready plugin for sublime text
<snippet>
<content><![CDATA[
\$(document).ready(function(){
$1
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>jqready</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope></scope> -->
[
{ "keys": ["ctrl+shift+y"], "command": "insert_snippet", "args": { "name": "Packages/XML/long-tag.sublime-snippet" } }
]
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 80;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);