Skip to content

Instantly share code, notes, and snippets.

View invalidusrname's full-sized avatar
🤷‍♀️

Matt invalidusrname

🤷‍♀️
View GitHub Profile
@invalidusrname
invalidusrname / create_labels.sh
Created September 28, 2017 13:27 — forked from MatthiasKunnen/create_labels.sh
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@invalidusrname
invalidusrname / 0_reuse_code.js
Created September 27, 2017 18:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@invalidusrname
invalidusrname / show_vars.sh
Created September 27, 2017 16:44
simulate bash login and show variable sources
PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7>&2
@invalidusrname
invalidusrname / dynamodb.log
Last active April 3, 2019 21:02
DynamoDB logging
aws dynamodb list-tables --endpoint-url http://localhost:8000 --debug
2017-09-25 16:26:45,684 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.11.61 Python/2.7.10 Darwin/16.7.0 botocore/1.5.24
2017-09-25 16:26:45,684 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['dynamodb', 'list-tables', '--endpoint-url', 'http://localhost:8000', '--debug']
2017-09-25 16:26:45,684 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x10866c758>
2017-09-25 16:26:45,684 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x108390c80>
2017-09-25 16:26:45,686 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/Cellar/awscli/1.11.61/libexec/lib/python2.7/site-packages/botocore/data/dynamodb/2012-08-10/service-2.json
2017-09-25 16:26:45,698 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.dynamodb: calling handler <fu
require 'open-uri'
require 'nokogiri'
url = 'http://www.summitpost.org/appalachian-trail-mileage-chart/593282'
css = 'noformat table'
doc = Nokogiri::HTML(open(url))
table = doc.css(css).detect { |e| e.text.include? 'Davenport' }
rows = table.css('tr')
@invalidusrname
invalidusrname / create_labels.sh
Created March 9, 2017 21:52 — forked from Chompas/create_labels.sh
Bash script to create multiple Github labels at once
#!/usr/bin/env bash
# This is a modification from https://gist.github.com/omegahm/28d87a4e1411c030aa89
# Colours and convention picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
## Instructions
# Bash 4+ is needed because of associative arrays
# jq (https://stedolan.github.io/jq/)
# Create access Token from Github (https://help.github.com/articles/creating-an-access-token-for-command-line-use/) and save it under ".token" file
# Comment / Uncomment / Add, all the labels you want

Keybase proof

I hereby claim:

  • I am invalidusrname on github.
  • I am invalidusrname (https://keybase.io/invalidusrname) on keybase.
  • I have a public key ASCyjcxEHqzTHDjyCm630kADIX6NKn7kiu2EQabf7wCD3Ao

To claim this, I am signing this object:

@invalidusrname
invalidusrname / typo.log
Last active April 3, 2019 21:03
Putso?
$ irb
irb(main):001:0> putso 'lol'
NoMethodError: undefined method `putso' for main:Object
Did you mean? puts
putc
from (irb):1
from /home/vagrant/.rbenv/versions/2.3.0/bin/irb:11:in `<main>'
@invalidusrname
invalidusrname / remove_trailing_whitespace.sh
Last active April 3, 2019 20:29
Remove trailing whitespace from ruby files
for f in $(git log -4 --name-only | grep ".rb" | sort | uniq); do perl -pi -e 's/ +$//' $f; done
#!/bin/bash
set -e
usage(){
echo "Usage: ./script/release [current,major,minor,patch,pre] or ./script/release custom [version_number]"
exit 1
}
function version_release
{