Skip to content

Instantly share code, notes, and snippets.

View 2016rshah's full-sized avatar

Rushi Shah 2016rshah

View GitHub Profile
@likethesky
likethesky / elixirphoenix.bash
Last active June 7, 2024 17:26
Installing Elixir & the Phoenix framework with Homebrew on OS X
$ brew update && brew doctor # Repeat, until you've done *all* the Dr. has ordered!
$ brew install postgresql # You'll need postgres to do this... you may also need to 'initdb' as well. Google it.
$ brew install elixir
$ mix local.hex # Answer y to any Qs
$ createuser -d postgres # create the default 'postgres' user that Chris McCord seems to like -- I don't create mine w/a pw...
# Use the latest Phoenix from here: http://www.phoenixframework.org/docs/installation -- currently this is 1.0.3
# ** Answer y to any Qs **
$ mix archive.install https://github.com/phoenixframework/phoenix/releases/download/v1.0.3/phoenix_new-1.0.3.ez
@wilkie
wilkie / 0-description.md
Created October 26, 2014 02:11
This shows you how to handle simple, dynamic colored versions of svg files in ruby + sinatra.

This is an example of how to present a route in Sinatra that returns a colored version of an existing svg. This assumes the first line is the line, which is what inkscape produces. Just drop in any svg, and it will give you one where it is colored in with the given color.

/dynamic/foo.svg returns the normal image.

/dynamic/foo.svg?color=red gives you a red image.

/dynamic/foo.svg?hue=150&sat=50&light=50 gives you a slightly green version of the image.

/dynamic/foo.svg?hex=fff gives a white version of the image.