Why are we here? Ruby community is awesome New people are awesome Developers are exhausted by social interaction Recharge with a movie by yourself Conferences are about starting conversation Its hard Introvert != shy
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 Object | |
cattr_accessor :current_test | |
end | |
module Minispec | |
class TestClass | |
def self.prepare(desc) | |
name = name_for_class(desc) | |
Class.new(base_test_class(name)) do | |
define_singleton_method(:name) { name } |
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
require 'test_helper' | |
require 'minitest/autorun' | |
class MiniTest::Spec | |
include ActiveSupport::Testing::SetupAndTeardown | |
include ActiveRecord::TestFixtures | |
alias :method_name :__name__ if defined? :__name__ | |
self.fixture_path = File.join(Rails.root, 'test', 'fixtures') | |
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
--colour | |
-I app |
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
require 'net/http' | |
require 'open-uri' | |
require 'hpricot' | |
# A simple get request should not require this much boilerplate. | |
def fetch_data(uri) | |
uri = URI(uri) | |
req = Net::HTTP::Get.new(uri.request_uri) | |
req['Accept'] = "application/xhtml+xml" |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.
- Create new server
- Login to new server
- ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
- accept the RSA key
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 | |
# url rewriter for rubygems squid proxy | |
STDOUT.sync = true | |
while line = gets | |
url = line.split(' ')[0] | |
# Cargo-culted this conditional, not sure if it is necessary | |
response = if url |
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
A Beastiary of Badassery | |
- | |
SQLisms | |
-- | |
WITH | |
arrays and unnest | |
window functions | |
JSON | |
row types |
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
# How to find files that have spaces around attribute delimiters | |
git ls-files *.slim* | xargs -I {} slimrb -c {} | grep "spaces around attribute delimiters" |
OlderNewer