Skip to content

Instantly share code, notes, and snippets.

# patch for make ruby error
# % rbenv install 1.8.7-p375
# ...
# ossl_pkey_ec.c:815: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function)
# ossl_pkey_ec.c:815: error: (Each undeclared identifier is reported only once
# ossl_pkey_ec.c:815: error: for each function it appears in.)
# make[1]: *** [ossl_pkey_ec.o] error 1
# ...
#
# refs: http://forums.cpanel.net/f5/case-84173-error-installing-ruby-377831.html
@rbarazi
rbarazi / gist:2937541
Created June 15, 2012 16:51
.DS_Store git removal
find .-name .DS_Store -print0 | xargs -0 git-rm --ignore-unmatch
@rbarazi
rbarazi / cool_ruby_gists
Created April 18, 2013 13:29
Cool ruby gists
ruby -e '(0..23).cycle{|f|print "\r"+[128336+f].pack("U")+" ";sleep 0.2}'
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
# USAGE:
@rbarazi
rbarazi / airbrake_adapter.rb
Created July 4, 2012 16:26
Yell Airbrake Adapter
require 'yell'
require 'toadhopper'
class AirbrakeAdapter < Yell::Adapters::Base
setup do |options|
@env = options[:environment]
@airbrake = Toadhopper(options[:api_key])
end
write do |event|
if event.message.respond_to?(:backtrace)
@rbarazi
rbarazi / haml2handlebars.rb
Created February 13, 2012 19:35
Converts haml to handlebars
#!/usr/bin/env ruby
require "rubygems"
require "haml"
class MethodMissingString < String
def method_missing(m, *args, &block)
args = args.collect do |arg|
arg.is_a?(MethodMissingString) ? arg : "\"#{arg}\""
end
(function() {
// Usage:
//
// <script src='http://pressly.com/redirect.js' type='text/javascript'></script>
// <script>Pressly.redirect("http://tablet.domain.com");</script>
//
/* >> Generated code from Issue Config */
// Supported devices to redirect
@rbarazi
rbarazi / dabblet.css
Created December 16, 2011 19:09
Untitled
p:hover:after {
content: attr(data-small);
display: block;
border: 1px solid red;
position:absolute;
bottom: 0;
right: 0;
}
@rbarazi
rbarazi / dabblet.css
Created December 16, 2011 19:09
Untitled
p:hover:after {
content: attr(data-small);
display: block;
border: 1px solid red;
position:absolute;
bottom: 0;
right: 0;
}
@rbarazi
rbarazi / dabblet.css
Created December 16, 2011 18:31
Font Techniques
/* Font Techniques */
body {
background: white;
}
p {
text-align: center;
box-shadow: inset 0px 0px 5px rgba(0,0,0,0.3);
margin: 10px auto;