Skip to content

Instantly share code, notes, and snippets.

Andy O'Neill werkshy

Block or report user

Report or block werkshy

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
@werkshy
werkshy / .yamllint
Created Jun 25, 2018
Yamllint Config Example
View .yamllint
extends: default
rules:
comments:
min-spaces-from-content: 1
indentation:
spaces: 2
line-length:
max: 120
View worker.swift
#!/usr/bin/swift
//
// work.swift
//
//
// Created by Andy O'Neill on 4/20/17.
//
//
View a.rb
context "With Barlteby turned on" do
# TODO Get rid of NA tests and test single sku regions only when regionalization complete,
# check sku on VP instead of business region sku as well.
context "With a North American Viewable Product" do
- scenario "Lets you successfuly edit both associated skus and other fields" do
+ scenario "Lets you successfully edit both associated skus and other fields" do
+ t0 = Time.now
allow(BartlebyMode).to receive(:mode) { "full" }
viewable_product = FactoryGirl.create(:viewable_product, :bartleby_mode_full)
@werkshy
werkshy / .gitconfig
Created Sep 15, 2016
Git aliases for ~/.gitconfig
View .gitconfig
[alias]
s = status
st = status # svn muscle memory
stat = status # svn muscle memory
co = checkout # svn muscle memory
cp = cherry-pick # svn muscle memory
fp = push --force-with-lease # prevents force push if there's new commits on master
lol = log --pretty=oneline --abbrev-commit --graph --decorate # compact log format
recent-branches = !"git for-each-ref --sort=-committerdate refs/heads/ | head" # show recent branches
list-merged = !"git branch --merged | grep -v '\\*' | grep -v master | xargs -n 1" # list branches that are merged into master
View git-publish-branch
#!/usr/bin/env ruby
## git-publish-branch: a simple script to ease the unnecessarily complex
## task of "publishing" a branch, i.e., taking a local branch, creating a
## reference to it on a remote repo, and setting up the local branch to
## track the remote one, all in one go. you can even delete that remote
## reference.
##
## Usage: git publish-branch [-d] <branch> [repository]
##
View a.rb
Fetching artifacts for build 16324
Slow tests in master:
./spec/features/desktop/cms_spec.rb:75 = 149.444043556s
./spec/features/desktop/cms_spec.rb:96 = 135.444048707s
./spec/features/desktop/cms_spec.rb:64 = 119.635322032s
./spec/models/cross_sell_spec.rb:21 = 98.239432649s
./spec/models/viewable_products_group_spec.rb:102 = 89.524765266s
./spec/features/desktop/cms_spec.rb:64 = 86.404476988s
./spec/features/desktop/shave_plans_spec.rb:257 = 74.239284343s
./spec/features/admin/viewable_product_groups_spec.rb:110 = 67.89632375s
View npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/oneill/.heroku/iojs-v2.1.0-linux-x64/bin/iojs',
1 verbose cli '/home/oneill/.heroku/iojs-v2.1.0-linux-x64/lib/node_modules/npm/cli.js',
1 verbose cli 'install',
1 verbose cli 'docker' ]
2 info using npm@2.10.1
3 info using node@v2.1.0
4 verbose install initial load of /home/oneill/.heroku/package.json
5 verbose installManyTop reading scoped package data from /home/oneill/.heroku/node_modules/heroku-local/package.json
6 verbose readDependencies loading dependencies from /home/oneill/.heroku/package.json
View gist:3b1e37125aea0637962d
^C^C
oneill@lefou:15:39:~/w/harrys [master] $ bundle update selenium-webdriver --verbose
HTTP GET https://bundler.rubygems.org/api/v1/dependencies
HTTP 200 OK
Fetching source index from https://rubygems.org/
Resolving dependencies...HTTP GET https://rubygems.org/quick/Marshal.4.8/pry-0.10.1-java.gemspec.rz
HTTP 302 Moved Temporarily
HTTP GET https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/pry-0.10.1-java.gemspec.rz
HTTP 200 OK
HTTP GET https://rubygems.org/quick/Marshal.4.8/pry-0.10.1-i386-mswin32.gemspec.rz
@werkshy
werkshy / statsd_admin_client.py
Last active Aug 29, 2015
Python class for interacting with the statsd admin interface. List stats, counters, timers, and gauges. Delete counters, timers, and gauges.
View statsd_admin_client.py
import socket
import simplejson as json
# Copyright (c) EnergyHub, Inc 2013
# Released under MIT license.
class StatsdAdminClient(object):
"""
A client for statsd admin interface.
Example commands: stats, counters, timers, gauges, delcounters, deltimers, delgauges, quit
@werkshy
werkshy / Makefile
Last active Aug 29, 2015
Makefile for ruby-protoc (generate .pb.rb files from .proto files).
View Makefile
# Brief makefile to create ruby objects from protocol buffer definitions
GENDIR=./lib/rails-pipeline/protobuf
RUBY_PROTOC=bundle exec ruby-protoc
PROTOS=$(wildcard $(GENDIR)/*.proto)
PBS=$(PROTOS:%.proto=%.pb.rb)
all: $(PBS)
%.pb.rb: %.proto
You can’t perform that action at this time.