Skip to content

Instantly share code, notes, and snippets.

View scotje's full-sized avatar

Jesse Scott scotje

View GitHub Profile
#!/bin/bash
# Usage: gh-rename-master <newbranch> [<remote>]
#
# Renames the "master" branch of the current repository both locally and on GitHub.
# Also attempts to update current user's fork if specified remote is not 'origin'
#
# Based on https://gist.github.com/mislav/5ac69530acbe1b4ca909e272caabfdba
#
# dependencies: GitHub CLI v0.10
set -e
---
.rubocop.yml:
default_configs:
AllCops:
Exclude:
- "foo/bar/*"
{
"name": "test-metadata",
"version": "0.1.0",
"author": "Jesse Scott",
"summary": "",
"license": "Apache-2.0",
"source": "",
"dependencies": [
],
@scotje
scotje / -
Created November 13, 2015 23:31
#!/usr/bin/env ruby
require 'rubygems'
require 'fileutils'
require 'word_salad'
def decorate_log_with_branch(log, branch_name, root_sha, origin=[])
cursor = root_sha
log[root_sha][:branch] = branch_name
@scotje
scotje / keybase.md
Last active August 29, 2015 14:07
keybase.md

Keybase proof

I hereby claim:

  • I am scotje on github.
  • I am scotje (https://keybase.io/scotje) on keybase.
  • I have a public key whose fingerprint is 3029 00E5 CEE5 7572 3718 03CB 2858 26E2 6E0A AD93

To claim this, I am signing this object:

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@scotje
scotje / development.rb
Created June 7, 2012 22:59
Completely hide asset related logging in Rails 3.2
config.assets.logger = false
# Save a copy of this file to the backup directory
THEDATE=`date +"%Y%m%d"`
THETIME=`date +"%H%M%S"`
filedata=`cat`
mkdir -p "$TM_BACKUP_DIR/$THEDATE"
echo "$filedata" > "$TM_BACKUP_DIR/$THEDATE/$TM_FILENAME.$THEDATE.$THETIME.backup"