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
# I was thinking about it, and thought if you were going to do "mixins" in Haml | |
# then they ought to work in a predictable way. In ERB you can simply define a | |
# method and place more ERB inside of it. This does not work in Haml, but maybe | |
# it should. | |
require 'sinatra' | |
require 'haml' | |
get '/erb' do | |
erb :test_erb |
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
=begin | |
License: latest LGPL :D | |
As per my discussion with Gianni (@gf3), | |
http://twitter.com/phillmv/status/2659984348 | |
http://twitter.com/phillmv/status/2660026344 | |
http://twitter.com/phillmv/status/2660059102 | |
http://twitter.com/phillmv/status/2660184885 | |
http://twitter.com/phillmv/status/2660283856 and | |
http://twitter.com/phillmv/status/2660306850 |
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
parse_git_branch() { | |
RSLT='' | |
GIT_BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' | awk '{print $2}'` | |
if [ "$GIT_BRANCH" ] | |
then | |
GIT_STATUS=`git status 2> /dev/null | grep 'working directory clean'` | |
CLR='2' | |
if [ "$GIT_STATUS" ] | |
then | |
CLR='2' |
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
require 'open-uri' | |
labe = open("http://en.wikipedia.org/wiki/Labe").read | |
usa = open("http://en.wikipedia.org/wiki/USA").read | |
puts labe | |
puts "\n\n\n" | |
puts usa |