Skip to content

Instantly share code, notes, and snippets.

View nhr's full-sized avatar

N. Harrison Ripps nhr

View GitHub Profile
@nhr
nhr / okr-example.md
Created October 3, 2019 15:47 — forked from DavidWells/okr-example.md
OKR example

template: project version: 1.0 project: [Project Title] description: [Description] owner: [Owner] deadline: [YYYY-MM-DD] okrs:

  • OBJECTIVE: Grow Our Global Business
  • KR: Hit our global sales target of $100 Million in Sales

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@nhr
nhr / swn-template.yaml
Created January 28, 2017 10:29
This template can be run on an OpenShift cluster to start a very basic SWN Sector Generator deployment.
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: swn
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
@nhr
nhr / swn-template.yaml
Created January 28, 2017 10:27
This template can be run on an OpenShift cluster to start a very basic SWN Sector Generator deployment.
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: swn
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
@nhr
nhr / framinate.rb
Created December 22, 2016 04:45
This script is useful for rotating & scaling images to a specific native resolution. I wrote it to prep pictures for use with a digital photo frame. I found that it is very hard to automate good cropping, but having everything at the same scale saves a lot of the work.
#!/usr/bin/env ruby
require 'fastimage'
FWIDTH = 1024
FHEIGHT = 600
workdir = Dir.pwd
Dir.foreach(workdir) { |item|
# This is an example of a bring your own (byo) host inventory
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
#etcd
#lb
# Set variables common for all OSEv3 hosts
sudo dnf install rpmdevtools fedora-packager nodejs npm libgit2-devel libgnome-keyring-devel
sudo npm install -g npm@2
sudo npm install -g inherits@2
git clone https://github.com/nylas/N1
script/build (takes a very long time)
script/grunt mkrpm
find rpm in /tmp/nylas-build/rpm/
@nhr
nhr / .bashrc
Created November 9, 2015 21:29
Git Branch Display in $PS1
# Helper function for our fancy prompt.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
# Fancy prompt function
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
@nhr
nhr / labsnap
Created April 29, 2015 20:06
Shell script for copying / restoring qcow2 image files. Be warned: this does not check to make sure that the files are not currently in use!
#!/bin/bash
RESTORE=false
RESTORE_DIR=''
while getopts ":r:" OPT; do
case $OPT in
r)
RESTORE_DIR="$OPTARG"
RESTORE=true
@nhr
nhr / gist:f86974c733cd5edeb8b2
Created September 24, 2014 13:33
Bash helper functions for capturing eth0 IP addr and public IP addr
function get_eth0_ipaddr() {
eth0_ip=$(ip addr list eth0 | grep 'inet ' | tr -s ' ' | cut -d ' ' -f 3 | cut -d '/' -f 1)
echo "${eth0_ip}"
}
function get_public_ipaddr() {
public_ip=$(curl -s ipecho.net/plain)
echo "${public_ip}"
}