Skip to content

Instantly share code, notes, and snippets.

@nhoag
nhoag / migrate-git.sh
Created January 31, 2013 17:27
Migrate a Git repo. Original: https://gist.github.com/4593250
#!/bin/bash
src_git="$1"
dst_git="$2"
git clone --mirror ${src_git} migrate
cd migrate
git remote add dst ${dst_git}
git push --mirror dst
cd ..
@nhoag
nhoag / birds.geojson
Last active November 12, 2015 19:30
2014-04-05 18:15 UTC
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nhoag
nhoag / README.md
Last active August 29, 2015 13:59
Acquia SimpleSAMLphp Script
@nhoag
nhoag / autokey-acquia.sh
Last active January 22, 2017 13:26
Auto-handling of ssh keys for Acquia Hosting
#!/bin/bash
# Acquia
CLOUDAPI_ID='id'
CLOUDAPI_KEY='key'
DOCROOT="docroot"
CREDS="${CLOUDAPI_ID}:${CLOUDAPI_KEY}"
ssh-keygen -q -b 4096 -t rsa -N "" -f ./script.key
@nhoag
nhoag / incompatible.rb
Last active August 29, 2015 14:08
Scrape Acquia's list of incompatible modules
require 'rubygems'
require 'mechanize'
require 'logger'
require 'nokogiri'
# Create a new mechanize object
mech = Mechanize.new
# Uncomment for verbose output
# mech.log = Logger.new $stderr
@nhoag
nhoag / capybara-cheat-sheet.md
Last active August 29, 2015 14:08 — forked from zhengjia/capybara cheat sheet
Common Capybara code snippets

Navigating

    visit('/projects')
    visit(post_comments_path(post))

Clicking links and buttons

// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
{
"title": "Apache Overview",
"services": {
"query": {
"list": {
"2": {
"id": 2,
"type": "topN",
"query": "",
"alias": "",
{
"title": "Apache logs",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,