Skip to content

Instantly share code, notes, and snippets.

View reidcooper's full-sized avatar

Reid Cooper reidcooper

View GitHub Profile
@ashblue
ashblue / A-Pen-by-Ash-Blue.markdown
Created December 2, 2013 21:27
A Pen by Ash Blue.
@streeter
streeter / private.xml
Last active July 1, 2016 16:19
My private.xml configuration for KeyRemap4MacBook for my Cooler Master QuickFire Rapid.
<?xml version="1.0"?>
<root>
<item>
<name>Streeter's Layout</name>
<item>
<name>Mission Control/Dashboard to F3,F4</name>
<identifier>remap.consumer_expose_dashboard_to_f3_f4</identifier>
<autogen>__KeyToKey__ KeyCode::F3, KeyCode::EXPOSE_ALL</autogen>
<autogen>__KeyToKey__ KeyCode::F4, KeyCode::DASHBOARD</autogen>
</item>
@rrosiek
rrosiek / install_mysql.sh
Last active February 28, 2025 18:55
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
@XVilka
XVilka / TrueColour.md
Last active April 27, 2025 10:17
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@synth
synth / nice_errors
Created January 19, 2014 21:32
A recursive algorithm for generating nested error messages in rails
def nice_errors(object, errors)
object.errors.each do |key|
error_obj = object.send(key)
if error_obj.kind_of?(Array)
errors[key] = {}
error_obj.each {|item| nice_errors(item, errors[key])}
elsif error_obj.kind_of?(ActiveRecord::Base)
errors[error_obj.id] = {}
nice_errors(error_obj, errors[error_obj.id])
else
@waltz
waltz / .zshrc
Created January 27, 2014 22:22
ZSH, iTerm2 Alt-Arrow (Left/Right) Key remap
# Remap alt-left and alt-right to forward/backward word skips.
# via @waltz, https://gist.github.com/waltz/8658549
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
@trakhov
trakhov / wallp_api.rb
Last active September 12, 2016 18:04
This ruby script downloads a random photo from flickr.com (search by "1680x1050" and "nature" tags).
require 'flickraw'
require 'open-uri'
FlickRaw.api_key="your api key"
FlickRaw.shared_secret="your secret"
args = {
tags: "1680x1050,nature",
tag_mode: "all",
per_page: 500,
@camallen
camallen / gist:9482975
Created March 11, 2014 10:16
Uninstall all Rbenv gems from shell
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
@michaelv
michaelv / facebook-mass-delete-group-members.js
Created April 21, 2014 15:00
This javascript removes all users from a facebook group. It works with the new facebook layout. Paste this in the javascript console. Script tested in Firefox. Known issues: 1. when facebook responds slowly, the script might experience hickups.. 2. occasionially, the error 'this user is not a member of the group' pops up.. IMPORTANT: add your ow…
var deleteAllGroupMembers = (function () {
var deleteAllGroupMembers = {};
// the facebook ids of the users that will not be removed.
// IMPORTANT: add your own facebook id here so that the script will not remove yourself!
var excludedFbIds = ['1234','11223344']; // make sure each id is a string!
var usersToDeleteQueue = [];
var scriptEnabled = false;
var processing = false;
deleteAllGroupMembers.start = function() {
#=Navigating=
visit('/projects')
visit(post_comments_path(post))
#=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click_on('Button Value')