Skip to content

Instantly share code, notes, and snippets.

class Node
constructor: (@name, @time, @next = null) ->
each: (callback) ->
current = this
while current.next?
current = current.next
callback current
a = new Node "a", 0
ANTLR_PATH=/usr/local/Cellar/antlr/4.2/antlr-4.2-complete.jar
TARGET=pdl
FILE=$1
green="$(tput setaf 2)"
red="$(tput setaf 1)"
magenta="$(tput setaf 5)"
reset="$(tput setaf 7)"
tick="\xE2\x9C\x93"
cross="\xE2\x9C\x98"
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH=/usr/local/bin:/usr/local/bin/sublime:~/bin:/node_modules/coffee-script/bin:$PATH
export CLASSPATH=/jars/junit-4.10.jar:/jars/spock-core-0.6.jar:/usr/local/Cellar/antlr/4.2/antlr-4.2-complete.jar:$CLASSPATH
alias antlr4='java -jar /usr/local/Cellar/antlr/4.2/antlr-4.2-complete.jar'
alias grun='java -cp /usr/local/Cellar/antlr/4.2/antlr-4.2-complete.jar:. org.antlr.v4.runtime.misc.TestRig'
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
@ECHO OFF
set ANTLR_PATH= :: Your path to the Antlr jar
set TARGET= :: Language name
set FILE=%1
echo \nGenerating into/%TARGET%
java -jar %ANTLR_PATH% -o %TARGET% %TARGET%.g4
echo Compiling using /%TARGET%
javac -cp %ANTLR_PATH% %TARGET%/*.java

Git instructions for Alfie

Following are your instructions for uploading your completed work to the github repo I set up for you. Follow these carefully, and if you have any questions just let me know!

1. Getting setup

Before you start writing code, do the following things. Open up Git-Bash (the terminal program I put on your desktop/taskbar for you), then cd into the project

sudo -v
set -e
if [ ! -d "/usr/local/bin" ]; then
sudo mkdir -p /usr/local/bin
fi
# Install the latest stable nave the node.js environment switcher Node.js
sudo sh -c 'curl -fsSL https://raw.github.com/isaacs/nave/master/nave.sh > /usr/local/bin/nave && chmod ugo+x /usr/local/bin/nave'

#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

[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]
# 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
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