Using RAILS 2.3.5
$ rails foobar
$ cd foobar
$ script/generate controller SpecialEvents
Add/edit the following files to those in this gist.
$ rake db:migrate
$ rake test
| # Sets the current person in the session from the person fixtures. | |
| def logged_in_as(person, &block) | |
| context "logged in as #{person}" do | |
| setup do | |
| @instructor = Factory(instructor) if instructor.is_a? Symbol | |
| InstructorSession.create(instructor) | |
| end | |
| merge_block(&block) | |
| end |
| body { | |
| font: Arial; | |
| /* | |
| font: 18px/27px 'YanoneKaffeesatzRegular', Arial, sans-serif; | |
| font-family:"Myriad Pro",georgia, helvetica, arial, sans serif; | |
| */ | |
| font-size:larger; | |
| background:black; color:white; margin-left:300px; width:500px; padding:20px} | |
| a {color:yellow; background:black;} | |
| a:hover {color:black; background:yellow;} |
Using RAILS 2.3.5
$ rails foobar
$ cd foobar
$ script/generate controller SpecialEvents
Add/edit the following files to those in this gist.
$ rake db:migrate
$ rake test
| require "rake/clean" | |
| DEVELOPMENT_URI = "$HOME/Sites/test_site" | |
| PRODUCTION_URI = "[email protected]:path/to/public_html" | |
| CLEAN.include "_site" | |
| CLOBBER.include "_includes/*.html_frag" | |
| def jekyll(opts = "", path = "") | |
| sh "rm -rf _site" |
| # The beginnings of a declarative model syntax for CoffeeScript. | |
| # SEE: http://almostobsolete.net/declarative-models-in-coffeescript.html | |
| # Thomas Parslow | |
| # Email: [email protected] | |
| # Twitter: @almostobsolete | |
| # The top part is the setup, see below that for the demo | |
| # To see this run right away try copy pasting it into the 'Try | |
| # CoffeeScript' box at http://jashkenas.github.com/coffee-script/ |
| var CountdownLatch = function (limit){ | |
| this.limit = limit; | |
| this.count = 0; | |
| this.waitBlock = function (){}; | |
| }; | |
| CountdownLatch.prototype.countDown = function (){ | |
| this.count = this.count + 1; | |
| if(this.limit <= this.count){ | |
| return this.waitBlock(); | |
| } |
| function maybe(value) { | |
| var obj = null; | |
| function isEmpty() { return value === undefined || value === null } | |
| function nonEmpty() { return !isEmpty() } | |
| obj = { | |
| map: function (f) { return isEmpty() ? obj : maybe(f(value)) }, | |
| getOrElse: function (n) { return isEmpty() ? n : value }, | |
| isEmpty: isEmpty, | |
| nonEmpty: nonEmpty | |
| } |
| #!/usr/bin/env bash | |
| # Gist: https://gist.github.com/2509971 | |
| # | |
| # This is a psuedo-fork of [gnome-terminal-colors=solarized][1] | |
| # The values were hard coded (where the above was modularized) for | |
| # ease of using curl or wget to pull from a gist. | |
| # | |
| # curl https://raw.github.com/gist/2509971/solarized.sh | bash -s | |
| # |