Skip to content

Instantly share code, notes, and snippets.

View csgavino's full-sized avatar

Carlos Gavino csgavino

View GitHub Profile
# Looks for the escaped fragment meta tag. If found, gets the HTML snapshot
# instead
module GoogleBotSimulator::EscapedFragment
def has_meta_fragment?
(@response.search('//meta[@name="fragment"]/@content').to_s == '!') ? true : false
end
def url_with_escaped_fragment(url)

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

sudo apt-get update
sudo apt-get install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev sqlite3 libsqlite3-dev git-core
sudo apt-get install libxslt-dev libxml2-dev
# sudo apt-get install libmysqlclient-dev ruby-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
sudo apt-get install libreadline-dev
### Install Java ###