Skip to content

Instantly share code, notes, and snippets.

View tlberglund's full-sized avatar

Tim Berglund tlberglund

  • StarTree
  • Mountain View CA
View GitHub Profile

Minneapolis NFJS Git Workshop

  • Create a repository
    • git init project
  • Configuration
    • git config user.email
    • git config user.name
    • git config --global user.name "Tim Berglund"
    • git config --global user.email "tlberglund@github.com"
    • git config --global color.ui auto

This should be rended as Clojure code:

(defn hello-world [] (println "hello, world"))

Great success!

Ratpack Workshop

1. Hello World

  • Unzip the hello-world.zip file into your project directory
  • Write the initial Ratpack.groovy

2. Beginning Templates

  • Unzip the public.zip file into src/ratpack.
@tlberglund
tlberglund / PoetryEmitter.java
Created November 29, 2012 16:19
Poetry Emitter encode() method
import org.apache.commons.codec.language.DoubleMetaphone;
public String encode(String line) {
DoubleMetaphone codec = new DoubleMetaphone();
List<String> words = new ArrayList<String>();
StringTokenizer st = new StringTokenizer(line);
while(st.hasMoreTokens()) {
String word = st.nextToken();
@tlberglund
tlberglund / clojurescript-workshop.md
Created November 19, 2012 16:55
ClojureScript Resources

ClojureScript Workshop

MacOS Setup

  1. Install Homebrew

  2. Install Clojure

    brew install clojure

@tlberglund
tlberglund / photos_tag.rb
Created September 30, 2012 20:28 — forked from sukima/photos_tag.rb
Jekyll Plugin for easy FancyBox usage
# Title: Photos tag for Jekyll
# Authors: Devin Weaver
# Description: Allows photos tag to place photos as thumbnails and open in fancybox. Uses a CDN if needed.
#
# ** This only covers the markup. Not the integration of FancyBox **
#
# To see an unabridged explination on integrating this with [FancyBox][1]
# Please read my [blog post about it][2].
#
# [1]: http://fancyapps.com/fancybox/
@tlberglund
tlberglund / workshop-outline.md
Created September 22, 2012 20:43
NFJS Atlanta Git Workshop

NFJS Git Workshop

  • Create a repo
    • git config --global user.name "Tim Berglund"
    • git config --global user.email "tlberglund@github.com"
    • git config --global color.ui auto
    • git init atlanta
  • Add files
    • Create caesar.txt
    • git add caesar.txt
@tlberglund
tlberglund / build.gradle
Created September 13, 2012 11:01
Demo of Capturing Dependencies in Gradle
repositories {
mavenCentral()
}
configurations {
download
}
dependencies {
download('org.appfuse:appfuse-spring:2.1.0') {
git config --global alias.lg "log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
@tlberglund
tlberglund / gist:3107262
Created July 13, 2012 20:31
git lg alias
log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --