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
#!/bin/bash | |
if [ -f .rvmrc ]; then | |
source .rvmrc | |
fi |
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 "xpath" # XPath is a separate gem now | |
module Cucumber | |
module Rails | |
module CapybaraSelectDatesAndTimes | |
def select_date(field, options = {}) | |
date = Date.parse(options[:with]) | |
selector = %Q{.//fieldset[contains(./legend, "#{field}")]} | |
within(:xpath, selector) do | |
find(:xpath, '//select[contains(@id, "_1i")]').find(:xpath, ::XPath::HTML.option(date.year.to_s)).select_option |
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
From d75eb570e16f765b5c6acee8f1fc1c8013eeba4f Mon Sep 17 00:00:00 2001 | |
From: Szymon Nowak <szimek@gmail.com> | |
Date: Mon, 11 Oct 2010 19:37:03 +0200 | |
Subject: [PATCH] Return a valid empty JSON on successful PUT and DELETE requests. | |
--- | |
.../lib/action_controller/metal/responder.rb | 20 ++++++++++++++++++++ | |
actionpack/test/controller/mime_responds_test.rb | 19 +++++++++++++++++++ | |
2 files changed, 39 insertions(+), 0 deletions(-) |
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 ActiveRecord::Base | |
# Allow to bypass Delayed Job asynchronous handling | |
def self.dont_handle_asynchronously(*methods) | |
method_aliases = {} | |
methods.each do |method| | |
# TODO move this part into Delayed::MessageSending::ClassMethods#handle_asynchronously | |
aliased_method, punctuation = method.to_s.sub(/([?!=])$/, ''), $1 | |
with_method, without_method = "#{aliased_method}_with_delay#{punctuation}", "#{aliased_method}_without_delay#{punctuation}" | |
method_aliases[method] = {:with => with_method, :without => without_method} |
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
# Using Ruby with "rack" gem - run using "rackup" | |
use Rack::Static, :urls => [""]; run nil |
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
ACTIVE_ATTRIBUTES: 35721 | |
ACTIVE_ATTRIBUTE_MAX_LENGTH: 35722 | |
ACTIVE_TEXTURE: 34016 | |
ACTIVE_UNIFORMS: 35718 | |
ACTIVE_UNIFORM_MAX_LENGTH: 35719 | |
ALIASED_LINE_WIDTH_RANGE: 33902 | |
ALIASED_POINT_SIZE_RANGE: 33901 | |
ALPHA: 6406 | |
ALPHA_BITS: 3413 | |
ALWAYS: 519 |
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
var net = require('net'), | |
util = require('util'), | |
zombie = require('zombie'), | |
browser = new zombie.Browser, | |
buffer = ""; | |
net.createServer(function (socket) { | |
socket.setEncoding('utf8'); | |
socket.on('data', function (data) { |
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
;; emacs configuration | |
(push "/usr/local/bin" exec-path) | |
(add-to-list 'load-path "~/.emacs.d") | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t) |
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
# lib/mail/queued_delivery.rb | |
require 'mail' | |
module Delayed | |
class PerformableMail | |
attr_reader :mail | |
def initialize(mail) | |
@mail = mail | |
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
.clearfix { | |
display: block; | |
zoom: 1; | |
} | |
.clearfix::after { | |
clear: both; | |
content: "."; | |
display: block; | |
font-size: 0; |