Skip to content

Instantly share code, notes, and snippets.

View indirect's full-sized avatar

André Arko indirect

View GitHub Profile
@indirect
indirect / gist:5339229
Created April 8, 2013 18:27
change selenium timeout
require 'selenium/webdriver'
Capybara.register_driver :selenium_with_long_timeout do |app|
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 3600
Capybara::Selenium::Driver.new(app, :browser => :firefox, :http_client => client)
end
Capybara.current_driver = :selenium_with_long_timeout
@indirect
indirect / gist:5313074
Created April 4, 2013 18:51
just... wow
Class.new(ActionView::Base).new.extend(helper_class).tap do |h|
class << h
send :include, Rails.application.routes.url_helpers
end
end
@indirect
indirect / contribs.txt
Created April 2, 2013 04:01
Contributors with more than 100 lines in Bundler
José Valim: 44803 lines of diff
Andre Arko: 26616 lines of diff
Carlhuda: 26356 lines of diff
Carl Lerche: 25631 lines of diff
Terence Lee: 11756 lines of diff
Yehuda Katz: 4013 lines of diff
Nathan Weizenbaum: 3689 lines of diff
Joshua Hull: 2120 lines of diff
wycats: 2085 lines of diff
José Valim: 1662 lines of diff
git config --global alias.pr '!f() { if [[ -z $2 ]]; then local remote=origin; local pr=$1; else local remote=$1; local pr=$2; fi; echo git fetch $remote refs/pull/$pr/head:refs/remotes/pr/$pr; }; f'
@indirect
indirect / html-pipeline
Last active December 14, 2015 13:49
html-pipeline executable for Github markdown previews
#!/usr/bin/env ruby
ARGV.each do |path|
abort "#{path} doesn't exist!" unless File.exist?(path)
end
require 'html/pipeline'
filters = [
HTML::Pipeline::MarkdownFilter,
HTML::Pipeline::SanitizationFilter,
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAwijdP3d/kX/2amSFaqswoHQma47ahyf1Be8UM0v33Lospfr3
FnSgRa2Wfn0lguBw534ls0yVAoFa3ZKs3AkBvWbf0WwJb5WwOWlYxo0IfLT2r+Zm
qlmit0KbRkPpVeW6/4FB/qN+j4S57yFMP9ISbqG1VbxdW3SIwXzYrzRyadQgE1+d
7pSVCUzXHjYMdqlbK45Zy+aOV4JXloBb7ygLxXEsXRFJK3gDa1I6syPsl22k86MQ
0bagDEj1KkGS0XuFWUs1Ay+LMpwjLHkZxZm3D8XOv1c81M1ndduS2Al/NBT9SY5q
SaYu14XqdA6Ccc3nkMbNc5sqNgWdKEoLpAt/eQIDAQABAoIBAQCZ8sTbGekweQHt
gh63YV2BHBeKmQ50tB33woWF1uqFPalBQijAyWB7XxRA3wHrMALVypQiAsrz3ZUq
sq4VGZ8jinpVFxC0RUAhhYI6jID6QJKJDmrBD6mRHWL458gPr8QB639kZEZpjZfQ
H9rRj8PFrLqXbG+poFD++frlkPRXK9Tlw5/g1rujr2d/C9IoZ7P2nZVDkKV0An/7
@indirect
indirect / pygments_plugin.rb
Created December 10, 2012 23:26
Local and remote Pygments in Octopress
begin
# First try to use pygmentize.rb
require 'pygments'
rescue LoadError
# If not, use heroku's hosted pygments service
require 'net/http'
require 'uri'
PYGMENTIZE_URL = URI.parse('http://pygmentize.herokuapp.com/')
end
@indirect
indirect / tmux-main.sh
Created November 27, 2012 21:05
A script to maintain a single tmux session for all terminal windows
#!/bin/bash
# Make sure there is a 'main' session
tmux has -t main || tmux new -d -s main
# Calculate the number of the next session
session_name="main.$(tmux ls -F '#S' | grep main | wc -l | sed 's/^[ ]*//')"
# Create the new window
new="new -d -t main -s $session_name"
# I have no idea what I'm doing
urls = [
"http://i1.kym-cdn.com/entries/icons/original/000/008/342/noidea.jpg", # photographer
"http://sureiscute.com/images/cutepictures/I_Have_No_Idea_What_I_m_Doing.jpg", # programmer
"http://i0.kym-cdn.com/photos/images/newsfeed/000/234/786/bf7.gif", # minigolf (animated)
"http://i2.kym-cdn.com/photos/images/newsfeed/000/234/137/5c4.jpg", # helicopter
]
module.exports = (robot) ->
@indirect
indirect / pair
Created November 11, 2012 07:47 — forked from steveklabnik/pair
A ruby script to change pairs
#!/usr/bin/env ruby
def usage
puts "./pair [name]: pair two people"
puts "./pair : switch to just steve"
exit
end
def set_config(name, email)
`git config user.name "#{name}"`