Below is adapted from Matt Might's blog post:
3 shell scripts to improve your writing, or "My Ph.D. advisor rewrote himself in bash." .
Weasel words--phrases or words that sound good without conveying
# Two ENV variables control the 'gem' command: | |
# | |
# GEM_HOME: the single path to a gem dir where gems are installed | |
# GEM_PATH: a standard PATH to gem dirs where gems are found | |
# | |
# A gem directory is a directory that holds gems. The 'gem' command will lay | |
# out and utilize the following structure: | |
# | |
# bin # installed bin scripts | |
# cache # .gem files ex: cache/gem_name.gem |
# Example of how you can to use Capybara with plain Rails' integration tests and FactoryGirl (or plain MyModel.create…) | |
require 'test_helper' | |
require 'capybara' | |
require 'capybara/dsl' | |
require 'database_cleaner' | |
Capybara.app = Pardy::Application | |
Capybara.default_driver = :rack_test | |
DatabaseCleaner.strategy = :truncation |
Below is adapted from Matt Might's blog post:
3 shell scripts to improve your writing, or "My Ph.D. advisor rewrote himself in bash." .
Weasel words--phrases or words that sound good without conveying
.gist-highlight { | |
border-left: 3ex solid #eee; | |
position: relative; | |
} | |
.gist-highlight pre { | |
counter-reset: linenumbers; | |
} | |
.gist-highlight pre div:before { |
# Natty (Ubuntu 11.04) | |
$ dpkg -L libc6-dev | grep /types.h | |
/usr/include/bits/types.h | |
/usr/include/rpc/types.h | |
/usr/include/sys/types.h | |
# Oneiric (Ubuntu 11.10) | |
$ dpkg -L libc6-dev | grep /types.h |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rails/test_help' | |
require 'minitest/autorun' | |
require 'minitest/pride' | |
require 'capybara/rails' | |
class MiniTest::Spec | |
include ActiveSupport::Testing::SetupAndTeardown |
<keybind key="W-Escape"> | |
<keybind key="q"> | |
<action name="Close"/> | |
</keybind> | |
<!-- Keybindings for resizing, ala divvy --> | |
<!-- 30% --> | |
<keybind key="C-h"> | |
<action name="MoveResizeTo"> | |
<x>0</x> | |
<height>98%</height> |
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".