This script will install ruby-debug19 under your current Ruby 1.9.3 environment.
- rbenv
| # Hey there! | |
| # | |
| # This is a basic script that shows how to give projects an "allowance", like | |
| # 5 hours every month. First, it looks at how many hours you want to budget for | |
| # each project. Then, it establishes a connection with the Freckle API, using your | |
| # API token. It then loops through all the projects you listed, finding out how many | |
| # minutes it needs to add or remove from the existing project budget. Finally, it | |
| # updates the project and goes onto the next one. | |
| # | |
| # If you want to set a monthly budget, you would run this script once every month. |
| # config/routes.rb | |
| resources :documents do | |
| scope module: 'documents' do | |
| resources :versions do | |
| post :restore, on: :member | |
| end | |
| resource :lock | |
| end | |
| end |
| How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS | |
| Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing). | |
| The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here: | |
| * Heroku Hostname SSL | |
| * GoDaddy Standard SSL Certificate | |
| * Zerigo DNS | |
| Note: I am not using the Heroku Zerigo DNS add-on, instead I have a separate Zerigo account for my DNS needs. I do this because Zerigo offers 30 hosts on free direct accounts, versus only 10 hosts on the free Heroku add-on. |
| Host * | |
| # don't try to authenticate with Kerberos | |
| GSSAPIAuthentication no | |
| GSSAPIKeyExchange no | |
| # persist the ssh connection for 5 minutes | |
| # subsequent ssh connections respond faster because its reusing an existing connection | |
| ControlMaster auto | |
| ControlPath ~/.ssh/master-%r@%h:%p | |
| ControlPersist 5m |
| class ActionDispatch::Routing::Mapper | |
| def draw(routes_name) | |
| instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
| end | |
| end | |
| BCX::Application.routes.draw do | |
| draw :api | |
| draw :account | |
| draw :session |
| # spec/support/sorcery_helper.rb | |
| module Sorcery | |
| module TestHelpers | |
| module Rails | |
| def login_user_post(user, password) | |
| page.driver.post(sessions_url, { username: user, password: password}) | |
| end | |
| end | |
| end |
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs $network $syslog | |
| # Required-Stop: $local_fs $remote_fs $network $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the unicorn web server | |
| # Description: starts unicorn |
| --- a/load.c 2010-10-23 05:36:38.000000000 -0400 | |
| +++ b/patchload.c 2011-06-05 08:58:00.000000000 -0400 | |
| @@ -40,14 +40,6 @@ | |
| VALUE ary; | |
| long i; | |
| - for (i = 0; i < RARRAY_LEN(load_path); ++i) { | |
| - VALUE str = rb_check_string_type(RARRAY_PTR(load_path)[i]); | |
| - if (NIL_P(str) || !rb_is_absolute_path(RSTRING_PTR(str))) | |
| - goto relative_path_found; |