Skip to content

Instantly share code, notes, and snippets.

# An array of ids is returned for rake task output (see lib/tasks/doc_news.rake)
def self.process_queued_for_sample!(time: Time.now)
unprocessed.sample_sent_at_for(time).map do |digest|
if digest.can_sample?
digest.sample!
digest.id
end
end
end
@jseifer
jseifer / gist:2314204
Created April 5, 2012 21:14
Our Culture of Exclusion
Our Culture of Exclusion
April 2nd, 2012
Originally from: http://ryanfunduk.com/culture-of-exclusion/
Or, why I'm not going to *conf
Lately there have been a lot of great articles being written and discussion
happening around sexism in the tech industry. And the flames are being fanned
by several high profile incidents of people saying and doing just plain stupid
http://blog.brandonbloom.name/2010/09/how-two-pythonistas-accidentally-fell.html
http://sirupsen.com/get-started-right-with-rvm/
http://web2linux.com/ree-passenger-and-rails-on-ubuntu/
http://www.refactoringredmine.com/
http://github.com/k33l0r/monit
http://github.com/perfectline/template-bucket
http://github.com/purify/hey_sorty
http://github.com/tchandy/octopus
http://github.com/rtomayko/tilt
http://github.com/MSch/devise-twitter
http://antirez.com/post/autocomplete-with-redis.html
http://praegnanz.de/html5video/
http://briancray.com/2010/09/08/html5-microdata/
http://diveintohtml5.org/extensibility.html
http://www.quirksmode.org/blog/archives/2010/09/testing_blackbe.html
http://intridea.com/2010/9/13/a-web-developer-goes-native-with-android
http://nvie.com/posts/how-i-boosted-my-vim/
http://onebuttonmouse.com/ramblings/domainbrain-2-0-is-now-available/
http://www.tuttoaster.com/ruby-for-php-developers/
http://blog.brandonbloom.name/2010/09/how-two-pythonistas-accidentally-fell.html
source ~/.bash/shortcuts
source ~/.git-completion.sh
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo "!"
}
function __git_branch {
__git_ps1 " %s"
require 'rubygems'
require 'benchmark'
require 'bcrypt'
REPITITIONS = 50
passwords = %w(password)
passwords.each do |password|
puts "Password to hash: #{password}"
#! /usr/bin/env ruby
#
# Save in your path as "isreg" and chmod +x. Then: isreg domain.com
#
puts `whois #{ARGV[0]}` =~ /No match for \"#{ARGV[0]}\"/mi ? "No" : "Yes"
# Find and replace in textmate to fix merge conflicts.
# As shown this takes the second capture group
#
# <<<<<<< HEAD:2983fjasd
# code1
# =======
# code2
# >>>>>>> master:2983rfja9sd
#
# As shown, this find and replace will take code 2.
#!/bin/bash
export PATH="/opt/rubyee/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/postgresql83/bin/:/usr/local/bin:/usr/local/sbin:~/.bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin"
/opt/rubyee/bin/ruby $*
# Export old iphone address book backup to vcards so you can reimport.
# Use a tool like the Backup extractor (http://supercrazyawesome.com/)
# to get the backup created, then grab Library/AddressBook/AddressBook.sqlitedb
# and AddressBookImages.sqlitedb. Put them in this directory.
#
# Requires sqlite3 gem and vpim gem
# Usage: ruby export.rb > filename.vcf
require 'rubygems'
require 'sqlite3'