Skip to content

Instantly share code, notes, and snippets.

View wkf's full-sized avatar
🤝

Will Farrell wkf

🤝
View GitHub Profile
@byplayer
byplayer / rspec_cheat_sheet.rd
Created May 11, 2011 03:16
rspec cheat sheet
INSTALL
=======
$ gem install rspec
RSPEC-RAILS
===========
RAILS-3
=======
@flavio
flavio / gemfile_lock2geminabox.rb
Created February 2, 2012 09:21
Parse Gemfile.lock, download all gems from rubygems and then upload them to a local instance of geminabox
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler'
require 'fileutils'
require 'net/http'
require 'net/https'
require 'uri'
TMP_DIR = "/tmp/gems"
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@orta
orta / gist:4945269
Last active April 13, 2016 00:35
Get Google Analytics Stats from Hubot
# Artsy Editorial
#
# Get Page stats from google analytics
GA = require('googleanalytics')
util = require('util')
require('date-utils');
module.exports = (robot) ->
robot.hear /stats (.*)http:\/\/artsy.net\/(.*)/i, (msg) ->
@Jared314
Jared314 / gist:5028617
Last active December 14, 2015 04:29
Basic CSS3 Selector to Clojure Enlive vector format converter
;[org.jodd/jodd-lagarto "3.4.2"]
;(:import [jodd.csselly CSSelly CssSelector Combinator Selector$Type])
(defn format-attr-selector [x]
(case (.getName x)
"id" (str "#" (.getValue x))
"class" (str "." (.getValue x))
""))
(defn format-selector [x]
@djangofan
djangofan / endorsedmethod.java
Last active January 6, 2023 22:05
Exercise on safely waiting for unstable web elements with WebDriver.
// This is the official Selenium documention endorsed method of waiting for elements.
// This method is ineffective because it still suffers from
// the stale element exception.
public static void clickByLocator ( final By locator ) {
WebElement myDynamicElement = ( new WebDriverWait(driver, 10))
.until( ExpectedConditions.presenceOfElementLocated( locator ) );
myDynamicElement.click();
}

Installation

FreeBSD

portmaster irc/irssi
portmaster irc/irssi-xmpp

OS X

brew install irssi

@jpetazzo
jpetazzo / gist:6127116
Created July 31, 2013 23:21
Debian/Ubuntu containers protips, thanks to @spahl
# this forces dpkg not to call sync() after package extraction and speeds up install
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
# we don't need and apt cache in a container
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
@crosbymichael
crosbymichael / links.md
Last active June 4, 2018 01:01
Container Relationships
@tmatilai
tmatilai / Vagrantfile
Last active January 1, 2021 19:49
My global Vagrant configuration (~/.vagrant.d/Vagrantfile)
# URI of the local (caching) HTTP proxy
LOCAL_HTTP_PROXY = 'http://192.168.33.200:8123'
# Configures vagrant-cachier and vagrant-proxyconf.
# Should be called only on "local machine" providers.
def configure_caching(config)
if Vagrant.has_plugin?('vagrant-cachier')
config.cache.enable_nfs = true
config.cache.enable :gem
config.cache.enable :npm