Skip to content

Instantly share code, notes, and snippets.

View brntbeer's full-sized avatar
:shipit:

Brent Beer brntbeer

:shipit:
View GitHub Profile
@brntbeer
brntbeer / amsterdam-recs.md
Last active May 22, 2019 08:43
Amsterdam Recommendations. Pulled from a personal internal repo

Amsterdam Recos

If you are looking to get high, download the app "Greenmile" to find coffeeshops and smartshops near you! (only available on Android) Also, Boerejongens Coffeeshop is legit.

Jordaan

To Do:

  • Anne Frank Museum: tour of her house, always a huge line so book in advance and go on a weekday if you can.
@jonico
jonico / notify_on_pr_assignments.coffee
Last active March 18, 2021 23:58
Hubot script that will send a direct message to any person that gets assigned to a pull request.
# Description
# Hubot script that will send a direct message to any person that gets assigned to a pull request.
# This came out of a discussion where a customer received too many GitHub notifications and wanted something
# succinct for the pull request assignment event.
#
# Dependencies:
# This script was tested with the slack adapter.
# In order to make use of it, you would have to put into Hubot's script folder and setup a GitHub webhook that points to
# <hubot deployment url>/hubot-pr and is delivering at least the pull requests events of the repositories you are interested
#
@peff
peff / git-du
Last active May 17, 2019 07:43
git-du script
#!/usr/bin/perl
#
# Generate a listing of all paths ever used in the repository, along with the
# disk space used by the path throughout the entire history. Note that sizes
# for trees are cumulative; they include the sizes of all of the paths below
# them, in addition to the tree storage itself. All sizes are in bytes, and
# reflect git's delta and zlib compression.
#
# One caveat is that this is just the _current_ on-disk size. The on-disk size
# of each object may change if git repacks and chooses different delta bases,
@martinda
martinda / git-merge-before-build.dsl
Created April 6, 2016 23:40
Jenkins Pipeline DSL code to demonstrate git merge before build
// Jenkins Pipeline DSL to demonstrate git merge before build
node {
String path = '/tmp/jenkins/upstream-repo'
sh "rm -rf ${path}"
ws(path) {
sh 'git --version'
sh 'git init'
sh 'touch README.md; git add README.md; git commit -m "init"'
sh 'git checkout -b pull-requests/1/from'
sh 'touch file.txt; git add file.txt; git commit -m "Add file"'
@mislav
mislav / netflix.sh
Last active February 21, 2024 16:56
Watch Netflix as if you were in the US by proxying DNS through a DigitalOcean instance.
#!/bin/bash
set -e
droplet=netflix
interface=Wi-Fi
us_regions=( nyc1 nyc2 nyc3 )
random_region() {
echo ${us_regions[RANDOM % ${#us_regions[@]}]}
}
@trey
trey / hubot-slack-heroku.md
Last active October 25, 2021 03:18
Steps to Install Hubot in Slack using Heroku
@rick
rick / github.com.js
Created September 19, 2013 22:04
dotjs file to mute unread github notifications on a repo
$("button.mark-all-as-read").parent().prepend('<button class="box-action mute-all-unread css-truncate tooltipped upwards" original-title="mute all unread notifications"> <span class="octicon octicon-mute"></span> </button>');
$('button.mute-all-unread').click(function(event) {
// mute all unread notifications
$(this).parent().parent().parent().find('li.unread').find('.js-mute-notification button').click();
return false;
});
@tlberglund
tlberglund / git-loglive
Last active January 12, 2024 03:40
Log Live Git Command
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done
@argv0
argv0 / gist:3627514
Created September 4, 2012 22:35
Markov Chain Thing I Wrote A Long Time Ago
import random, sys
NONWORD = "\n"
STARTKEY = NONWORD, NONWORD
MAXGEN=1000
class MarkovChainer(object):
def __init__(self):
self.state = dict()
@defunkt
defunkt / gitio
Created September 11, 2011 08:11
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]