This file contains hidden or 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
→ time sudo gem install mongrel --no-ri --no-rdoc | |
Building native extensions. This could take a while... | |
Building native extensions. This could take a while... | |
Successfully installed gem_plugin-0.2.3 | |
Successfully installed daemons-1.0.10 | |
Successfully installed fastthread-1.0.7 | |
Successfully installed cgi_multipart_eof_fix-2.5.0 | |
Successfully installed mongrel-1.1.5 | |
5 gems installed |
This file contains hidden or 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
--- | |
gem: --no-ri --no-rdoc | |
:benchmark: false | |
:update_sources: true | |
:verbose: true | |
:backtrace: false | |
:sources: | |
- http://gemcutter.org | |
- http://gems.github.com/ | |
:bulk_threshold: 1000 |
This file contains hidden or 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
If I am in insert mode, and I put the cursor on the word 'test', and do the following command, I get an inconsistent cursor placement: | |
The command(while in insert mode): | |
------------ | |
<C-o>b<C-o>E | |
The text: | |
----------- |
This file contains hidden or 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
$ script/plugin --verbose install git://github.com/kalasjocke/authlogic_facebook_connect.git | |
Plugins will be installed using http | |
git init | |
Initialized empty Git repository in /Users/bracer/projects/local/my_project/vendor/plugins/authlogic_facebook_connect/.git/ | |
git pull --depth 1 git://github.com/kalasjocke/authlogic_facebook_connect.git | |
$ ls -la /Users/bracer/projects/local/my_project/vendor/plugins/authlogic_facebook_connect/ | |
ls: /Users/bracer/projects/local/my_project/vendor/plugins/authlogic_facebook_connect/: No such file or directory |
This file contains hidden or 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
# redirect any request to the /secure path to https | |
RewriteCond %{SERVER_NAME} ^www.example.com$ | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteCond %{REQUEST_URI} secure | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] | |
# Redirect any pages not in the secure or image folder back to http | |
RewriteCond %{SERVER_PORT} 443 | |
RewriteCond %{REQUEST_URI} !secure | |
RewriteCond %{REQUEST_URI} !images |
This file contains hidden or 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 new | |
@survey = Survey.find params[:survey_id] | |
@questions = @survey.questions(:include => :answers).map{|q| q.answers.build} | |
respond_to do |format| | |
format.html # new.html.erb | |
format.xml { render :xml => @answer } | |
end | |
end |
This file contains hidden or 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
$ rvm install ree | |
/usr/local/rvm/rubies/ree-1.8.7-2010.02 | |
ree-1.8.7-2010.02 - #fetching (ruby-enterprise-1.8.7-2010.02) | |
ree-1.8.7-2010.02 - #extracting ruby-enterprise-1.8.7-2010.02 to /usr/local/rvm/src/ree-1.8.7-2010.02 | |
Error running 'gunzip < "/usr/local/rvm/archives/ruby-enterprise-1.8.7-2010.02.tar.gz" | tar xf - -C /usr/local/rvm/src', please check /usr/local/rvm/log/ree-1.8.7-2010.02/extract.error.log | |
There has been an error while trying to extract the source. Halting the installation. | |
$ rvm install 1.8 | |
/usr/local/rvm/rubies/ruby-1.8, this may take a while depending on your cpu(s)... |
This file contains hidden or 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
#!/bin/sh | |
# | |
# Copyright (c) 2007 Javier Fernandez-Sanguino <[email protected]> | |
# | |
# This is free software; you may redistribute it and/or modify | |
# it under the terms of the GNU General Public License as | |
# published by the Free Software Foundation; either version 2, | |
# or (at your option) any later version. | |
# | |
# This is distributed in the hope that it will be useful, but |
This file contains hidden or 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
body | |
#container | |
header | |
#content | |
#flash | |
.left-column | |
.right-column | |
footer |
This file contains hidden or 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 CalculatedAverage | |
def self.calc(goal=30, num_datums=30) | |
# num_datums must be even (and num_datums / 2 must be > the goal) | |
datums = [] | |
(num_datums / 2).times do |i| | |
datums << goal + (i) | |
datums << goal - (i) | |
end |