This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(1337, '127.0.0.1'); | |
console.log('Server running at http://127.0.0.1:1337/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo touch /usr/local/var/log/mongodb/output.log | |
sudo mongod --fork --logpath /usr/local/var/log/mongodb/output.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.git-completion.bash | |
export CLICOLOR='true' | |
export PS1='\[\033[1;35m\]\u\[\033[0m\]:\[\033[1;35m\]\W\[\033[0m\] \[\033[1;92m\]$(__git_ps1 "(%s)")\[\033[0m\]\$ ' | |
export PATH=/usr/local/bin:$PATH | |
# {{{ | |
# Node Completion - Auto-generated, do not touch. | |
shopt -s progcomp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages: | |
yum: | |
gcc: [] | |
make: [] | |
libtool: [] | |
autoconf: [] | |
automake: [] | |
uuid: [] | |
uuid-devel: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Disclaimer: | |
# We are not actively maintaining this script. We can't assure it will work, but we'll do our best to keep it updated. | |
# Credits: | |
# Original author: https://gist.github.com/lbosque/5876697 | |
# Contributors: | |
# https://gist.github.com/andrewxhill/5884845 Mac-compatible version | |
# https://gist.github.com/kentr / http://maplight.org/ new uuid format bugfix + email notification | |
# https://gist.github.com/sanderpick/185bc819c6a80b06d1b8 allow spaces in filesnames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Torque Heatmap w/ GMA</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<meta charset="utf-8"> | |
<link rel="shortcut icon" href="Icons/favicon.ico" /> | |
<style> | |
html, body, #map-canvas { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Torque Heatmap w/ GMA</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<meta charset="utf-8"> | |
<link rel="shortcut icon" href="Icons/favicon.ico" /> | |
<style> | |
html, body, #map-canvas { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION clearOld() | |
RETURNS TRIGGER | |
AS $$ | |
BEGIN | |
DELETE FROM sf_muni_points WHERE created_at < now()-'1 day'::interval; | |
RETURN NEW; | |
END; | |
$$ language plpgsql; | |
CREATE TRIGGER clearOldOnInsert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
ST_Length(ST_MakeLine(the_geom_webmercator ORDER BY created_at ASC)) AS sum | |
FROM sf_muni | |
WHERE id = '2' |