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
In the Beginning was the Command Line | |
by Neal Stephenson | |
About twenty years ago Jobs and Wozniak, the founders of Apple, came up with the very strange idea of selling information processing machines for use in the home. The business took off, and its founders made a lot of money and received the credit they deserved for being daring visionaries. But around the same time, Bill Gates and Paul Allen came up with an idea even stranger and more fantastical: selling computer operating systems. This was much weirder than the idea of Jobs and Wozniak. A computer at least had some sort of physical reality to it. It came in a box, you could open it up and plug it in and watch lights blink. An operating system had no tangible incarnation at all. It arrived on a disk, of course, but the disk was, in effect, nothing more than the box that the OS came in. The product itself was a very long string of ones and zeroes that, when properly installed and coddled, gave you the ability to manipulate other very long strings of o |
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
# update_attribute | |
guitar.update_attribute(:state, 'used') | |
# method on model | |
class Guitar | |
def mark_as_used | |
self.state = 'used' | |
self.save |
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
# Ruby Ree 1.8.7 | |
$ irb | |
ree-1.8.7 irb> 80 * "#" | |
TypeError: String can't be coerced into Fixnum | |
from (irb):1:in `*' | |
from (irb):1 | |
ree-1.8.7 irb> "#" * 80 | |
=> "################################################################################" |
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
Bem interessante esse iGist. A acho que eh uma maneira bem simples de escrever textos e compartilhar via iphone. |
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
Macbook White Unibody 13-inch | |
Processor: 2.26 GHz Intel Core 2 Duo | |
Memory: 4 GB 1333 MHz DDR3 | |
Graphics: NVIDIA GeForce 9400M 256 MB | |
Software: Mac OS X Lion 10.7.3 | |
HD: 250 GB SATA Disk | |
VENDIDO |
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 list --local --no-versions | xargs gem uninstall -a -x |
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
# Run: | |
# bash < <(curl -Ls https://raw.github.com/gist/2511153) | |
# Source: http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42 | |
echo "Grab and unpack the tarball." | |
mkdir ~/tmp && cd ~/tmp | |
curl -O http://opensource.apple.com/tarballs/gcc/gcc-5666.3.tar.gz | |
tar zxf gcc-5666.3.tar.gz | |
cd gcc-5666.3 |
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 Settings < YourAppName::Application | |
end | |
# The Problem: | |
# ==> .../.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:12:in `inherited': | |
# You cannot inherit from a Rails::Application child (RuntimeError) | |
# Because: | |
# http://apidock.com/rails/Rails/Application/Configurable/ClassMethods/inherited |
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
# Rspec formatter by RAFAELDX7 | |
# Use: rspec --require "dx7_formatter.rb" --format Dx7Formatter -- ./spec/your_spec.rb | |
require 'rspec/core/formatters/base_text_formatter' | |
class Dx7Formatter < RSpec::Core::Formatters::BaseTextFormatter | |
def index | |
@index ||= -1 | |
@index += 1 |
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
# my .inputrc file | |
# allow you to start typing a command and use the up/down arrow to auto complete from commands in your history | |
"\e[B": history-search-forward | |
"\e[A": history-search-backward |