Skip to content

Instantly share code, notes, and snippets.

View erochest's full-sized avatar

Eric Rochester erochest

View GitHub Profile
@erochest
erochest / git-whatmerged
Created November 9, 2018 18:30
Walks through the merge commits from the last day, and the diffs of what was merged.
#!/bin/bash
since=yesterday
branch=$(git branch | grep \* | cut -d ' ' -f2)
while (( "$#" )); do
case "$1" in
-s|--since)
since="$2"
shift 2
@erochest
erochest / lib.rs
Last active April 18, 2018 17:05
Print 7-digit numbers
#![feature(test)]
#[cfg(test)]
extern crate spectral;
extern crate test;
/// Takes a string containing a number and increments it in place. Returns whether the operation
/// was successful. The only time it isn't successful is if the input is empty or the operation
/// overflows.
///
@erochest
erochest / pm-powerhour.md
Created March 16, 2018 10:45
PM Powerhour presentation on XP
title date
PM Power Hour presentation
27 March 2018

XP

History

1996

@erochest
erochest / myip.bash
Created February 2, 2018 18:04
Select your IP using fzf and copy it to the clipboard
function myip() {
ifconfig | egrep -o '\d{1,3}(\.\d{1,3}){3}' | uniq | fzf | tee /dev/stderr | pbcopy
}
@erochest
erochest / index.html
Created January 18, 2018 13:56
Tracker Iteration Burnup
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Iteration Burnup</title>
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<form>
#!/bin/bash
echo "First, make sure your system's up-to-date and you have xcode installed."
echo "Let's get this out of the way."
sudo xcodebuild -license
echo "Getting the Pivotal workstation setup scripts."
curl https://github.com/pivotal/workstation-setup/archive/master.zip | unzip
mv workstation-setup workspace
rmdir workspace/pivotal_ide_prefs
#!/usr/bin/env python3
class A:
def __phone_home(self):
print('A.__phone_home')
def phone_home(self):
print('From A')
self.__phone_home()
*~
*.vim
.env
.env.fish
@erochest
erochest / upgrade-omeka
Created February 17, 2017 20:17
Upgrade script for Omeka
#!/bin/bash
TAG=$(git tag -l | tail -1)
echo "Upgrading to $TAG..."
echo
git stash save $TAG
git fetch origin
git checkout $TAG
import pandas as pd
import datetime
DATA_INPUT = 'data/nonpivoted_data.csv'
EPISODE_INPUT = 'data/toy_relabeled_episodes.csv'
def date(string):