Skip to content

Instantly share code, notes, and snippets.

View cgrusden's full-sized avatar

Corey G cgrusden

  • Ruby on Rails, iOS, Consulting
  • 100% Remote
View GitHub Profile
@cgrusden
cgrusden / heroku_env_copy.sh
Last active November 18, 2020 16:59 — forked from nabucosound/heroku_env_copy.sh
Script to copy environment variables from an existing heroku app to another one
#!/bin/bash
# Source: http://blog.nonuby.com/blog/2012/07/05/copying-env-vars-from-one-heroku-app-to-another/
# TODO: Create list of ENV vars to send all at once instead of setting and restarting server after each
# update
set -e
sourceApp="$1"
targetApp="$2"
@cgrusden
cgrusden / setup github issues labels.sh
Last active July 21, 2016 22:12 — forked from rentzsch/setup github issues labels.sh
Shell script to set up a GitHub Project's Issues' Labels as described in <http://rentzsch.tumblr.com/post/252878320/my-lighthouse-ticket-settings-with-colors>.WARNING: script assumes a newish project that hasn't really used labels yet. It deletes all default labels, which means DATA LOSS if you've used them for anything.
USER=
PASS=
REPO=
ACCOUNT=sofetch
# Delete default labels
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACCOUNT/$REPO/labels/bug"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACCOUNT/$REPO/labels/duplicate"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACCOUNT/$REPO/labels/enhancement"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACCOUNT/$REPO/labels/invalid"
@cgrusden
cgrusden / gist:1603349
Created January 12, 2012 21:45 — forked from conraddecker/gist:1603341
Basics for a bookmarklet
javascript: (function () {
_bookmarklet = document.createElement('script');
_bookmarklet.id = 'bookmarklet';
if (document.getElementById(_bookmarklet.id)) {
yimmelet.init();
} else {
_bookmarklet.type = 'text/javascript';
_bookmarklet.src = 'http://assets.domain.com/jsfile.js?x=' + (Math.random());
document.getElementsByTagName('head')[0].appendChild(_bookmarklet);
}