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
# install git | |
sudo apt-get install g++ curl libssl-dev apache2-utils | |
sudo apt-get install git-core | |
# download the Node source, compile and install it | |
git clone https://github.com/joyent/node.git | |
cd node | |
./configure | |
make | |
sudo make install | |
# install the Node package manager for later use |
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
heroku run bundle exec rails console --app flixmaster | |
require "dalli" | |
dc = Dalli::Client.new | |
dc.flush |
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
2012-06-01T19:22:59+00:00 heroku[router]: GET adsgame.heroku.com/images/mark.png dyno=web.1 queue=0 wait=0ms service=4ms status=200 bytes=546 | |
2012-06-01T19:22:59+00:00 heroku[nginx]: 75.70.205.204 - - [01/Jun/2012:19:22:59 +0000] "GET /images/mark.png HTTP/1.1" 200 546 "http://adsgame.heroku.com/projects/654?debug_assets=true" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5" adsgame.heroku.com | |
2012-06-01T19:23:00+00:00 heroku[router]: GET adsgame.heroku.com/images/popup_close_btn.png dyno=web.1 queue=0 wait=0ms service=4ms status=200 bytes=470 | |
2012-06-01T19:23:00+00:00 heroku[nginx]: 75.70.205.204 - - [01/Jun/2012:19:23:00 +0000] "GET /images/popup_close_btn.png HTTP/1.1" 200 470 "http://adsgame.heroku.com/projects/654?debug_assets=true" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5" adsgame.heroku.com | |
2012-06-01T19:23:00+00:00 app[web.1]: | |
2012-06-01T19:23:00+00:00 a |
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
#!/usr/bin/env ruby | |
# Usage | |
# ./deploy [staging|production] <options> | |
# | |
# Options | |
# -m or --maintenance - Put the application into maintenance mode | |
# -b or --branch - deploy from a branch other than "master" | |
if ['staging', 'production'].include? ARGV[0] |
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
class TripProviders::WebService::SubscriptionPaymentsController < TripProviders::WebServiceController | |
def create | |
# unless params.has_key?( :data ) | |
# return head :unprocessable_entity | |
# end | |
# errors = {} |
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
city = 'Lima' if city == 'Lima, Cusco, Sacred Valley' | |
city = 'Yukon' if city == 'Yukon' | |
city = 'San Francisco' if city == 'Bay Area' | |
city = 'Geneva' if city == 'Geneva, Anthy' | |
city = 'Denver' if city == 'Denver/Boulder' | |
city = 'Los Gatos' if city == 'Castle Rock State Park' | |
city = 'Kars' if city == 'Kars, Ardahan, Artvin' | |
city = 'Alicante' if city == 'Bollua near Alicante' | |
city = 'Mount Rainier' if city == 'Mt. Rainier National Park' | |
city = 'Mount Shasta' if city == 'Mt. Shasta' |
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
def show | |
@article = Article.find(params[:id]) | |
respond_to do |format| | |
format.html | |
format.json { render json: @article.as_json(only: [:id, :name, :content], include: [:author, {comments: {only:[:id, :name, :content]}}]) } | |
end | |
end |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
// Does this belong in the resolvers Seq? | |
// resolvers += Classpaths.typesafeResolver | |
val conspireSettings = Project.defaultSettings ++ Seq( | |
version := appVersion, | |
scalaVersion := V.Scala, | |
exportJars := true, | |
parallelExecution in Test := false, | |
resolvers ++= Seq( | |
"Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases", |
OlderNewer