Skip to content

Instantly share code, notes, and snippets.

N. Harrison Ripps nhr

Block or report user

Report or block nhr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View okr-example.md

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
View hosts
# 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
View keybase.md

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 Jan 28, 2017
This template can be run on an OpenShift cluster to start a very basic SWN Sector Generator deployment.
View swn-template.yaml
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: swn
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
@nhr
nhr / swn-template.yaml
Created Jan 28, 2017
This template can be run on an OpenShift cluster to start a very basic SWN Sector Generator deployment.
View swn-template.yaml
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: swn
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
@nhr
nhr / framinate.rb
Created Dec 22, 2016
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.
View framinate.rb
#!/usr/bin/env ruby
require 'fastimage'
FWIDTH = 1024
FHEIGHT = 600
workdir = Dir.pwd
Dir.foreach(workdir) { |item|
@nhr
nhr / gist:6235236
Created Aug 14, 2013
Cart failure output
View gist:6235236
[#<MCollective::RPC::Result:0x00000007746970 @agent="openshift", @action="cartridge_do", @results={:sender=>"ip-10-165-39-157", :statuscode=>1, :statusmsg=>"cartridge_do_action failed 157. Output Failed to execute: 'control start' for /var/lib/openshift/454448264886696208760832/immutant\nCLIENT_MESSAGE: Starting immutant cart\nCLIENT_MESSAGE: Timed out waiting for http listening port\n", :data=>{:time=>nil, :output=>"Failed to execute: 'control start' for /var/lib/openshift/454448264886696208760832/immutant\nCLIENT_MESSAGE: Starting immutant cart\nCLIENT_MESSAGE: Timed out waiting for http listening port\n", :exitcode=>157}}>]
View Building N1 RPM from source
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 Nov 9, 2015
Git Branch Display in $PS1
View .bashrc
# 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 Apr 29, 2015
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!
View labsnap
#!/bin/bash
RESTORE=false
RESTORE_DIR=''
while getopts ":r:" OPT; do
case $OPT in
r)
RESTORE_DIR="$OPTARG"
RESTORE=true
You can’t perform that action at this time.