Skip to content

Instantly share code, notes, and snippets.

Brandon Keepers bkeepers

Block or report user

Report or block bkeepers

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
@bkeepers
bkeepers / delete-comment.js
Created Sep 14, 2017
Probot app to delete 👍 and single emoji comments.
View delete-comment.js
// :+1: comments and single emoji
const pattern = /^\W*(:[\w-\+]+:|[\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])\W*$/g;
module.exports = robot => {
robot.on('issue_comment.created', context => {
if(context.payload.comment.body.match(pattern)) {
context.github.issues.deleteComment(context.issue());
}
})
}
@bkeepers
bkeepers / .env
Last active Sep 16, 2018
Probot plugin that ensures every commit message has the word "bananas"
View .env
# The ID of your GitHub App
APP_ID=
WEBHOOK_SECRET=development
# Uncomment this to get verbose logging
# LOG_LEVEL=trace # or `info` to show less
# Go to https://smee.io/new set this to the URL that you are redirected to.
# WEBHOOK_PROXY_URL=
View serialPromise.js
// Turn any function calls on a promise into function calls on the result.
//
// For example:
//
// serialPromise(promise).foo();
//
// Is the same as calling:
//
// promise.then(result => result.foo());
//
@bkeepers
bkeepers / opensource-career.md
Last active Jan 20, 2018
Tell me your story about how open source has impacted your career.
View opensource-career.md

I’m working on a talk about the relationship between community participation and careers, and want to hear from people who feel like open source has impacted their career. Tell me your story!

Below are some questions related to get you started. Feel free to either fork this gist, blog your answers and send me the link, or email them directly to me at bkeepers@github.com. I will ask your permission before sharing anything about your story publicly.

  • How do you feel your participation in open source has impacted your career, both good and bad?

  • How did you first get exposed to open source? Why did you decide to learn more about it?

  • Do you code? If so, were you a coder when you got started with open source? Why did you learn to code?

View gist:055a148eb742fb9df736
>> require 'org-ruby'
>> puts Orgmode::Parser.new(File.read('/tmp/test.org')).to_html
<ul>
<li>Item 1</li>
<li>Item 2
<pre class="example">
Example
Example
Example
</pre>
@bkeepers
bkeepers / modelines.rb
Last active Aug 29, 2015
Regular expression for vim and emacs modelines.
View modelines.rb
/
(?:
(-\*- \s* (?:mode:)? \s*) | # $1: Emacs
(\/\* \s* vim: \s* set \s* (?:ft|filetype)=) # $2: Vim
)
(\w+) # $3: language
(?:
(?(1) # If $1 matched...
;?\s* -\*- | # then close Emacs syntax
: \s* \*\/ # otherwise close Vim syntax
View README.md

Issue and Pull Request Age

@bkeepers
bkeepers / dabblet.css
Created Sep 15, 2014
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@bkeepers
bkeepers / twitnoise
Created Jun 3, 2014
Signal & Noise lists on Twitter
View twitnoise
#!/bin/bash
#
# This script encapsulates my process for keeping up with Twitter:
#
# 1. Create a private list called Signal, add everyone you currently follow to
# it, and begin curating it.
# 2. Follow everyone you meet or find interesting.
# 3. Create a private list called Noise, containing everyone you follow that are
# not in Signal.
# 4. Use Signal as your timeline in tweetbot. Switch to Noise when you are bored
You can’t perform that action at this time.