Skip to content
View a.rb
#!/usr/bin/env ruby -I.
class A
class A::B
class B
View weirdness.rb
require "rspec/autorun"
require "rspec/mocks"
require "active_support/all"
RSpec.describe "presence" do
specify { expect(spy).to be_present }
# Failures:
View config-initializers-dalli-unwrap-and-raw-read.rb
# By default, DalliStore doesn't deal with `raw` correctly when inside the
# LocalCache per-request middleware. The MemCacheClient fixes this already by
# adding another little module. Let's do the same.
# A PR has been lodged upstream:
# Once merged @sj26 will update dalli and remove this workaround.
if defined? ActiveSupport::Cache::DalliStore and Rails.cache.is_a? ActiveSupport::Cache::DalliStore
View wkhtmltopdf.rb
require 'formula'
class Wkhtmltopdf < Formula
homepage ''
url ''
version '0.12.2'
def install
`cat Payload | gzip -d - | cpio -id`
`tar -xvf usr/local/share/wkhtmltox-installer/app.tar.xz`
View wkhtmltopdf.rb
require 'formula'
class Wkhtmltopdf < Formula
homepage ''
url ''
sha256 '628363a79c82eb835e436cd62bce1b7323aed4e707affe57c3248e337a3ed18b'
version '0.9.0'
depends_on 'qt'
View instacuke.feature
Feature: Instacuke
Scenario Outline:
Then I should <result>
| result |
| succeed |
| be pending |
| fail |
View launch.rb
module Launch
extend Fiddle::Importer
dlload '/usr/lib/system/liblaunch.dylib'
@launch_activate_socket = import_function(*parse_signature("int launch_activate_socket(const char *name, int **fds, size_t *cnt)"))
def self.launch_activate_socket(name)
raise ArgumentError, "name must be a string" unless name.is_a? String
fds_ptr =
View rails-3-0-marshal-stream.rb
[:string, 1, "session_id"],
[:symbol, 0, "E"],
[:string, 2, "f8e1b8152ba7609c28bbb17ec9263ba7"],

Let's examine locking in mysql.

Creating a lock timeout in mysql console:

$ mysql -e 'create database lock_test'
Query OK, 1 row affected (0.00 sec)

$ mysql lock_test -e 'create table lockables (id int primary key auto_increment)'
Query OK, 0 rows affected (0.01 sec)
View mdns.rb
require "ipaddr"
require "resolv"
require "socket"
class MDNS
IP = ""
PORT = 5353
TTL = 255
def initialize(hosts=[])
Something went wrong with that request. Please try again.