Skip to content

Instantly share code, notes, and snippets.

View benjaminparnell's full-sized avatar
💭

Ben Parnell benjaminparnell

💭
View GitHub Profile
// req.url = '/sections' in both cases
// req.headers.accept = 'application/xml'
// Before
function acceptsMiddleware(req, res, next) {
// Goes into this if block, incorrect behaviour
if (req.url.indexOf('question-responses')) {
return next()
}
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# set window split
bind-key v split-window -h
bind-key b split-window
# default window title colors
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# set window split
bind-key v split-window -h
bind-key b split-window
# default window title colors
var http = require('http')
var ecstatic = require('ecstatic')
var staticd = ecstatic({
root: __dirname + '/static',
showDir: true,
autoIndex: true,
gzip: true
})
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# set window split
bind-key v split-window -h
bind-key b split-window
# default window title colors
@benjaminparnell
benjaminparnell / ben.js
Created February 19, 2015 17:15
Benchmarking challenge
module.exports = getArticlesWatchingHashtag
// This function returns the article ids that
// are watching the hashtags returned from a tweet.
//
// Takes an object of article ids/hashtags and a
// tweet returned from twitter's api
function getArticlesWatchingHashtag(articles, tweet) {
var articleKeys = Object.keys(articles)
return tweet.entities.hashtags.reduce(function (previous, current) {
execute pathogen#infect()
syntax enable
let g:jekyll_path = "~/Documents/blog"
execute "autocmd BufNewFile,BufRead " . g:jekyll_path . "/* syn match jekyllYamlFrontmatter /\\%^---\\_.\\{-}---$/ contains=@Spell"
colorscheme herald
" autoindent on when programming
# This will run your code on the file you pass to it via the command line
ANTLR_PATH = "Your path to the antlr jar here"
# make sure you are in the project dir
# not in the generated pascal folder
# Generate
java -jar $ANTLR_PATH -o pascal pascal.g4
# Compile
javac -cp $ANTLR_PATH pascal/*.java
[alias]
c = commit -am
up = pull
p = push
s = status -s
df = diff --color --color-words --abbrev
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
[color]
ui = always
[apply]

#A beginners guide to Git (and GitHub).

This guide is meant to be simple, and skips over a lot of things. Its meant to be a getting started guide and not an fully fledged manual. Keep this in mind and read around it.

I assume you have Git installed correctly. Get it here..

##Getting started