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
Index: intern.h | |
=================================================================== | |
--- intern.h (revision 22918) | |
+++ intern.h (working copy) | |
@@ -268,6 +268,15 @@ | |
VALUE rb_gc_enable _((void)); | |
VALUE rb_gc_disable _((void)); | |
VALUE rb_gc_start _((void)); | |
+VALUE rb_gc_enable_stats _((void)); | |
+VALUE rb_gc_disable_stats _((void)); |
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 -xe | |
EBS_DEVICE='/dev/sdh' | |
INSTANCE_ID=$1 | |
AKI=${2:-'aki-d314f0ba'} | |
ARI=${3:-'ari-d014f0b9'} | |
ARCH=${4:-'x86_64'} | |
SIZE=${5:-20} | |
AZ=${6:-'us-east-1a'} | |
NAME=${7:-"rollbook 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Untitled Document</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<script type='text/javascript'> | |
// returns true if the form is valid |
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
# config/initializers/cucumber_fakeweb_hook.rb | |
# If this looks like a test server process, make its FakeWeb available to other | |
# processes via DRb. That way Cucumber (which runs in a separate process) can | |
# dynamically register stubs for this server to use. | |
if Rails.env =~ /^culerity/ | |
require 'drb' | |
require 'fakeweb' | |
DRb.start_service("druby://localhost:30010", FakeWeb) |
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
if Rails.version == '2.3.8' && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel) | |
# Pulled right from latest rack. Old looked like this in 1.1.0 version. | |
# | |
# def [](k) | |
# super(@names[k] ||= @names[k.downcase]) | |
# end | |
# | |
module Rack |
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
1 min: | |
~Painless Javascript | |
koting hatduklgg | |
with wind tunnel | |
~tenderlove.dup jremsikjr | |
~iwanttolearnruby.com | |
(collecting resources for learning ruby) |
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
5 min: | |
~Objective-C + Rails: | |
Communicating w/rails from iOS/mac OS | |
Dan Hassin | |
1 min: | |
~Painless Javascript | |
koting hatduklgg | |
with wind tunnel |
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 'axlsx' | |
p = Axlsx::Package.new | |
p.workbook do |wb| | |
# define your regular styles | |
styles = wb.styles | |
title = styles.add_style :sz => 15, :b => true, :u => true | |
default = styles.add_style :border => Axlsx::STYLE_THIN_BORDER | |
header = styles.add_style :bg_color => '00', :fg_color => 'FF', :b => true | |
money = styles.add_style :format_code => '#,###,##0', :border => Axlsx::STYLE_THIN_BORDER | |
percent = styles.add_style :num_fmt => Axlsx::NUM_FMT_PERCENT, :border => Axlsx::STYLE_THIN_BORDER |
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 StationLog < ActiveRecord::Base | |
belongs_to :boat_log | |
has_many :rep_logs, :dependent => :destroy | |
accepts_nested_attributes_for :rep_logs, :reject_if => lambda { |a| a[:replicate].blank? }, :allow_destroy => true | |
EARTH_RADIUS = 6371000 # Earth's radius in meters | |
# convert degrees to radians | |
def self.convDegRad(value) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer