- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
# Original idea by MattHall | |
# https://gist.github.com/MattHall/1801090 | |
# usage rake new_post title="my awesome title" | |
require 'date' | |
task :new_post do | |
title = ENV['title'] | |
path = "_posts/#{Date.today}-#{title.downcase.gsub(/[^[:alnum:]]+/, '-')}.md" | |
if File.exist?(path) |
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
set :scm, :none | |
set :repository, "." | |
set :deploy_via, :copy |
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
fs = require 'fs' | |
{print} = require 'util' | |
{spawn} = require 'child_process' | |
task 'build', 'Build assets/js from src/coffee', -> | |
coffee = spawn 'coffee', ['-c', '-o', 'assets/js', 'src/coffee'] | |
coffee.stderr.on 'data', (data) -> | |
process.stderr.write data.toString() | |
coffee.stdout.on 'data', (data) -> |
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
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# Display unstaged (*) and staged(+) changes | |
export GIT_PS1_SHOWDIRTYSTATE="1" | |
# Display whether there are stashed ($) changes | |
export GIT_PS1_SHOWSTASHSTATE="1" | |
# Display if there are untracked (%) files | |
export GIT_PS1_SHOWUNTRACKEDFILES="1" | |
# Display if we're ahead (>) or behind (<) or diverged (<>) relative to upstream |
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 some_json = [ | |
{ | |
id: 1, | |
title: 'first_element', | |
other: 'i dont need it', | |
}, | |
{ | |
id: 2, | |
title: 'secont_element', | |
other: 'i dont need it', |
Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
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
// formats Date object in format "yyyy-mm-dd" | |
function format_date(date) { | |
var day = date.getDate().toString(); | |
var month = (date.getMonth() + 1).toString(); | |
var year = date.getFullYear().toString(); | |
if (day.length === 1) day = "0" + day; | |
if (month.length === 1) month = "0" + month; | |
return [day, month, year].join('-'); | |
} |
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
-B |
OlderNewer