Skip to content

Instantly share code, notes, and snippets.

View privacy_policy.markdown

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.

devver / terms_of_service.markdown
Last active March 12, 2023 18:02
A general Terms of Service under the Creative Commons License
View terms_of_service.markdown

Terms of Service

Last revised on [DATE]

The Gist

[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

View gist:268254
puts "abc".gsub(/a(b)c/) {$1+$1} # bb
puts "abc".gsub(/a(b)c/) { $&+$&} # abcabc
View gist:268242
15 attempted posts
93.3% success rate
8 attempted posts
50.0% success rate
View gist:268220
ben@slim:~/code/ruby/gemcutter/gem [master]$ GEMCUTTER_URL= gem webhook gemcutter_sample_webhook -a
Adding webhook...
Successfully created webhook for gemcutter_sample_webhook to
ben@slim:~/code/ruby/gemcutter/gem [master]$ GEMCUTTER_URL= gem webhook gemcutter_sample_webhook -f http://google.comTest firing webhook...
Successfully deployed webhook for gemcutter_sample_webhook to
devver / env.rb
Created September 15, 2009 14:57
Using Construct with Cucumber
View env.rb
require 'construct'
Before do
@construct = create_construct
After do
View test_helper.rb
class Test::Unit::TestCase
def capture_io
require 'stringio'
orig_stdout, orig_stderr = $stdout, $stderr
captured_stdout, captured_stderr =,
$stdout, $stderr = captured_stdout, captured_stderr
View ruby_subprocesses_part_2.rb
# :PROCESS: ruby, "ruby %f 2>&1"
# :BRACKET_CODE: "[ruby]", "[/ruby]"
# :TEXT:
# In the <a
# href="">previous
# article</a> we looked at some basic methods for starting subprocesses in Ruby.
# One thing all those methods had in common was that they didn't permit a lot of
# communication between parent process and child. In this article we'll examine
# a few built-in Ruby methods which give us the ability to have a two-way