Skip to content

Instantly share code, notes, and snippets.

View IanVaughan's full-sized avatar
👯‍♀️
OMG

Ian Vaughan IanVaughan

👯‍♀️
OMG
View GitHub Profile
@IanVaughan
IanVaughan / create-job.seq
Created November 29, 2016 12:48
Create job on Quiqup API
title Job Creation Sequence
client->+API: 1. POST /partner/jobs
API-->client: 2. Response
client->+API: 3. POST /partner/jobs/:id/submissions
API-->client: 4. Response
GIT
remote: git@github.com:QuiqUpLTD/playbookhr_gem.git
revision: 5a470c8708ad49682a6a66531583f0eef6536c50
specs:
playbook (0.0.1)
httparty
GIT
remote: git@github.com:QuiqUpLTD/quiqup_api_gem.git
revision: ed4070300547b36017804f916b49e4e34b5a31a7
* Pull & rebase on master (interactively), force push to origin
* Cherry pick multiple commits from another branch
*
@IanVaughan
IanVaughan / staging-branches
Created July 1, 2016 20:51
Bash script to show branches merged into a branch
#!/bin/sh
# Bash script to show branches merged into a branch
# Place within your $PATH
# Usage : staging-branches
# Finds all merged branches since master and lists them out
master_sha=$(git show-ref origin/master -s)
@IanVaughan
IanVaughan / git-cbr
Created April 7, 2016 06:27
Create git branch from ticket summary string
#!/usr/bin/env ruby
# Put this in your path named something like git-cbr
# chmod +x git-cbr
# then can git cbr This is the /ticket/I/am/working on
# creates a branch named "this-is-the-ticket-i-am-working-on"
safe_name = ARGV.map { |a| a.downcase }.join("-").gsub(/[^\w+]/, "-").gsub("--", "-")
%x{git co -b #{safe_name}}
@IanVaughan
IanVaughan / update_gems.sh
Created March 25, 2016 00:25
Update all outdated gems
#!/bin/sh -x
# Run this in your ruby/rails project to get a list from of gems from "bundle outdated"
# then itterate over each one, updating it and commiting the Gemfile and lock and pushing to CI
# That way any gem update that breaks CI can be isoltated, fixed or removed.
FILE=../outdated_gemlist.txt
touch $FILE
gem_list=$(cat $FILE)
echo $gem_list
@IanVaughan
IanVaughan / stash setup
Created March 19, 2016 14:11
Logstash setup
From https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04
# ELK Server
## Install Java 8
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
require 'digest'
require 'pry'
require 'yaml'
require 'ruby-progressbar'
require 'highline/import'
BASE_PATH = '/tmp/dups'
def file_exist?(filename)
File.exist? File.join(BASE_PATH, filename)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
20:55 1.392 3.312 5.017 12.094 1268.000 1144.000 0.000 28.000 26.000 17.000 32.00 C 20%
21:00 1.040 3.296 5.017 12.033 1092.000 1126.000 0.000 26.000 36.000 15.500 87.00 C 80%
21:05 1.040 3.296 5.017 12.033 1264.000 1126.000 0.000 28.000 42.000 17.375 91.00 C 80%
21:10 1.040 3.296 5.017 12.033 1347.000 1128.000 0.000 29.000 44.000 17.500 93.00 C 80%
21:15 1.392 3.280 4.966 12.094 1490.000 1130.000 0.000 31.000 45.000 22.500 94.00 C 80%
21:20 1.040 3.280 5.017 12.033 1493.000 1130.000 0.000 31.000 46.000 20.000 94.00 C 80%
21:25 1.040 3.280 5.017 12.033 1493.000 1130.000 0.000 31.000 46.000 19.500 94.00 C 80%
21:30 1.040 3.296 5.017 12.033 1500.000 1132.000 0.000 31.000 46.000 19.625 94.00 C 80%
21:35 1.040 3.280 5.017 12.094 1591.000 1132.000 0.000 32.000 47.000 20.000 94.00 C 80%
21:40 1.040 3.280 5.017 12.094 1607.000 1134.000 0.000 32.000 47.000 20.000 94.00 C 80%
@IanVaughan
IanVaughan / reset.sh
Created February 29, 2016 11:08
Reset localhost db
sudo chown ${USER}:staff /usr/local/var/postgres
initdb /usr/local/var/postgres -E utf8
createdb