Skip to content

Instantly share code, notes, and snippets.

View jeremygaither's full-sized avatar

Jeremy Gaither jeremygaither

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jeremygaither on github.
  • I am jeremygaither (https://keybase.io/jeremygaither) on keybase.
  • I have a public key ASCHbKFKIYei3jjOpSixkY5bNsj4nGHSHMWsTl2WujE3dAo

To claim this, I am signing this object:

@jeremygaither
jeremygaither / happy_git_on_osx.md
Created October 22, 2016 19:46 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o

@jeremygaither
jeremygaither / android_instructions.md
Created June 3, 2017 16:36 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@jeremygaither
jeremygaither / homebrew-github-api-token.md
Created June 3, 2017 23:53 — forked from christopheranderton/homebrew-github-api-token.md
Set your Github API Token If you hit a ”GitHub API rate limit exceeded” when searching with Homebrew (http://brew.sh/).

Description

PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS
When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded

Let's fix that! (yeah!)


Short version

PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS

@jeremygaither
jeremygaither / ami-clean.sh
Last active June 12, 2017 20:37 — forked from jdowning/ami-clean.sh
Script to clean up Ubuntu EC2 instance before packaging as an AMI
#!/bin/bash
function print_green {
echo -e "\e[32m${1}\e[0m"
}
print_green 'Clean Apt'
apt-get -y autoremove
aptitude clean
aptitude autoclean
@jeremygaither
jeremygaither / clone-org-all.rb
Created June 12, 2017 23:17
clone or pull all repos in an org
#!/usr/bin/env ruby -w
# Script will clone or pull all repos for an org into the current folder
require 'json'
require 'net/http'
require 'uri'
abort('Environment variable GITHUB_TOKEN must be set. Go to https://github.com/settings/tokens to create a token.') unless ENV.key?('GITHUB_TOKEN')
github_token = ENV['GITHUB_TOKEN']
# Invoke with:
# [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls11,Tls12'; Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest -UseBasicParsing -Uri "https://gist.github.com/jeremygaither/0979e4c2e6e3a4a69467dcc85d8a1eed/raw/Enable-WinRMRemoting.ps1" | Invoke-Expression
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
If (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You do not have Administrator rights to run this script!"
# Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
If (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You do not have Administrator rights to run this script!"
exit 1
}
(Test-Path C:\TEMP) -or (New-Item -ItemType directory -Path C:\TEMP)
(Test-Path C:\TEMP\AmazonSSMAgentSetup.exe) -and (Remove-Item C:\TEMP\AmazonSSMAgentSetup.exe)
@jeremygaither
jeremygaither / parse_dotenv.bash
Created August 23, 2017 22:17 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)