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
<div class="preview"> | |
<div class="inner"> | |
<img src="/assets/site/placeholder-4abfbbec6d239b5708837804f8149b32.png"> | |
<video preload="auto"> | |
<source src="https://di3zio5pem6rb.cloudfront.net/site/preview.mp4" type="video/mp4"> | |
<source src="https://di3zio5pem6rb.cloudfront.net/site/preview.ogv" type="video/ogv"> | |
<source src="https://di3zio5pem6rb.cloudfront.net/site/preview.webm" type="video/webm"> | |
</video> | |
</div> |
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
build_package_patched() { | |
# These three patches are included when RVM builds REE | |
cd source | |
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/tcmalloc.patch' | |
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/stdout-rouge-fix.patch' | |
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/no_sslv2.diff' | |
patch -p1 < tcmalloc.patch | |
patch -p1 < stdout-rouge-fix.patch | |
patch -p1 < no_sslv2.diff | |
cd .. |
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
# Setup the Service::Api | |
Service::Api.set(:environment, :production) | |
Service::Api.set(:root, Service.root) | |
Service::Api.set(:service, Service::Provider.new) |
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
stargate:rb mchung$ cat binding.rb | |
# Return bindings | |
def f | |
a = 42 | |
b = "foo" | |
binding | |
end | |
f_vars = f() |
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
# libxml-ruby segfault | |
require 'rubygems' | |
require 'xml' | |
def try(&block) | |
begin | |
yield if block_given? | |
rescue | |
puts "err: #{$!}" |
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
document.write("oh hai") |
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 Selfoo | |
# bar # Why doesn't this work? | |
def self.foo | |
puts "foo" | |
end | |
class << self | |
# puts foo # Why doesn't this work? |
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
inputs = args | |
spec = Gisting::Spec.new | |
inputs.each do |file_input| | |
input = spec.add_input | |
input.file_pattern = file_input | |
input.map do |map_input| | |
# 2722 mailbox 2006-05-23 00:08:39 | |
# 217 - 2006-05-23 15:41:48 | |
# 1326 www.crazyradiodeals.com 2006-05-23 18:00:30 | |
# 2722 mailbox 2006-05-23 00:08:39 |
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 'rubygems' | |
require 'net/ldap' | |
# sudo gem install ruby-net-ldap | |
HOSTNAME = "foo.local" | |
BASENAME = "dc=openrain,dc=com" | |
PORT = 389 | |
puts "What's your username" | |
username = STDIN.readline.chomp |
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 UsersController < ApplicationController | |
include Clearance::App::Controllers::UsersController | |
# Override and add in a check for invitation code | |
def create | |
@user = User.new params[:user] | |
invite_code = params[:invite_code] | |
@invite = Invite.find_redeemable(invite_code) | |
if invite_code && @invite |
OlderNewer