Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
sudo apt-get install vagrant
git clone https://bitbucket.org/puffnfresh/vagrant-haskell-heroku.git
cd vagrant-haskell-heroku
vagrant up
vagrant ssh
cabal update
cabal install cabal-install
cabal --version
> cabal-install version 0.14.0
> using version 1.14.0 of the Cabal library
/*
* fguillen: 2009-07-09
* return the last word from cursor on a textarea
* example: alert( "last word from cursor: " + $('#my_textarea').lastWord() )
* fixed bug which caused runaway loop when pattern doesn't recognise the start of the textarea (bigfudge)
*/
jQuery.fn.lastWord = function() {
var buffer = '';
this.each(function(){