Skip to content

Instantly share code, notes, and snippets.


Evan Reeves JadedEvan

View GitHub Profile
JadedEvan / jira-story-point-count.js
Created Oct 13, 2020
Javascript snippet to add up the total of story points for a Jira issue search
View jira-story-point-count.js
var total=0;$('#issuetable .issuerow .customfield_10025').each(function(index){if(this.innerText != ''){total += parseInt(this.innerText)}});console.log(total);
JadedEvan /
Last active Oct 21, 2016
How to revert a file to a known working state and apply upstream changes in a patch from a different branch.
# Check out the original file should receive the changes. This should be the version on your working branch
git checkout {MY-WORKING-BRANCH-SHA} -- path/to/my/file.txt
# Generate a diff of the file, ignoring space changes against a known branch. You should be on your working branch for this
git checkout my-working-branch
git diff HEAD..master --ignore-space-change -- path/to/my/file.txt > patch.diff
# Apply the patch. Note that you MUST use the same --ignore-space-change flag to apply properly
git apply --ignore-space-change patch.diff
JadedEvan / cloudformation-gnip-kinesis-connector.json
Created Jul 16, 2015
Amazon CloudFormation script to create a new EC2 server that runs the GNIP "sample-kinesis-connector" java application. This can be used to read incoming data from GNIP stream and push it over to Amazon Kinesis. GNIP pulled support for the Public AMI in the Amazon Marketplace, so here's one that will take you most of the way.
View cloudformation-gnip-kinesis-connector.json
"AWSTemplateFormatVersion" : "2010-09-09",
"Description": "Create EC2 instance to run a GNIP Kinesis connector. Creates CloudWatch alarms when 85% stream capacity reached.",
"Parameters" : {
"Environment" : {
"Type": "String",
"Description": "Environment in which to run",
"AllowedValues": ["production", "development"]
"InstanceTerminationProtection": {
JadedEvan /
Last active Jul 20, 2016
An article highlighting the difference in using instance methods over attribute accessors in Ruby classes. A fundamental concept that is often overlooked by beginner and intermediate Rubyists that can lead to cleaner, more predictable code

Ruby Design Patterns - Methods over Attributes


The objective of this article is to highlight the subtle differences between using class attributes and class methods in Ruby. Both offer a valid way to manipulate the state of an instance of a class. Things can get increasingly complex, hard to test and hard to maintain as more instance variables are introduced. Beginner and intermediate Rubyists often miss this subtle but important point which can introduce bugs that may be hard to fix in their native habitat.

The reasons I prefer to use methods over instance variables:

  • Increases predictability of method calls
  • Increases predictability when testing
JadedEvan /
Last active Aug 29, 2015
How I resolved issues with my vagrant/Virtualbox not syncing folders from my host filesystem into my guest filesystem.


After updating my Virtualbox installation I was experiencing issues with vagrant not syncing my shared folders from my Mac OS X host to the guest filesystem (Ubuntu). This document logs some of the steps that I used to fix that problem.

After booting my vagrant VM, none of the folders I had specified in the directory were syncing.


  • Mac OS X 10.8.5 (Host)
  • Ubuntu 12.04 LTS (Guest)
JadedEvan /
Created Mar 30, 2015
HOWTO configure the puppet enterprise master (v3.7) to use environment directories


This document describes how to modify the Puppet Master (Enterprise v3.7) server configuration so that it can use environments for the manifests. Using those environment files allows the puppet agents to configure themselves in a variety of environments. It allows you to create a separate set of manifests and modules for specific environments, thereby safeguarding that untested modifications to no promote to the production nodes.

Setup environment directories

$ cd /etc/puppetlabs
$ sudo mkdir environments
$ sudo clown -r puppet:root environments
JadedEvan /
Last active Mar 1, 2017
Various openssl commands

Self Signed Certificate

Generate a new RSA key of 4096 bits. Adding the -des3 (or any other cipher) requires that the key have a password issued:

openssl genrsa -out server.key 2048

Generate a new CSR (Certificate Signed Request)

openssl req -new -key server.key -out server.csr
JadedEvan /
Created May 23, 2013
An interactive bash shell script to delete remote git branches
# An interactive script that allows you to delete multiple remote branches from
# a git repository with confirmation before deletion.
# Provide the path to the git repo as an argument to the script or it will
# prompt you for the path to the repo
# @version 0.1
# @author Evan Reeves <>
JadedEvan / git-notes.mdown
Created Jul 25, 2012
Library of useful git commands
View git-notes.mdown

Git Notes

Merge Two Branches in seperate repos

I have two independent repositories (A and B) and would like to merge one repo. (B) into another one (A) with keeping the whole history of both. What do to?

% cd projectA
% git remote add test ../path/to/other/repo && git fetch test

Adds a new branch called test which pulls in ALL branches from the /other/repo. git fetch test pulls code for all branches

JadedEvan /
Last active Dec 12, 2019
UNIX Tips - a catalog of useful UNIX commands

find commands

find . -regextype posix-egrep -regex ".*(rb|js)$"

Find all files ending in .rb or .js.

find . -name "*js" -o -name "*rb"

Same as above, not using regular expressions.

You can’t perform that action at this time.