Skip to content

Instantly share code, notes, and snippets.

Justin Abrahms justinabrahms

Block or report user

Report or block justinabrahms

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
Fetches some valid oauth credentials from edX, using only the secret & app key.
Based primarly off of the Facebook example in flask-oauth
from flask import Flask, redirect, url_for, session, request
from flask_oauth import OAuth
# Originally from
cd ~/src/
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
"""Goal here is to obfuscate GPG blocks using markov chains.
1. Train markov chain with some news articles on a similar topic.
2. Take in a GPG armored ascii block.
3. Use that input to determine which branch of the markov chain to walk.
4. The result would be a new article similar to the inputs.
5. The user could then take the same program, run it against the same
inputs, and output the GPG block.

mongod won't start.

If you've tried sudo service mongod start and it says it started but didn't, or maybe gives you a cryptic error.. consider removing the lock file at /edx/var/mongo/mongodb/mongod.lock and try again.

No locks available.

So, when running some tests, I got the error "No locks available". This post suggests NFS. The actual fix appears to be to restart rpcbind sudo service rpcbind restart which hung my vagrant VM. When it restarted, I got the error below, but things seemed to work as I wanted and I'm slowly backing away.


Code Review

A guide for reviewing code and having your code reviewed.

Peer code reviews are the single biggest thing you can do to improve your code - Jeff Atwood


Code review is an important part of a team's development process. It helps to:

  • disseminate knowledge about the codebase/technology/techniques across teams
  • increase awareness of the features being developed
View gist:40c256ce2548da2d6e79
def do_sprintly_automated_deploy(role, current_build, build_number):
Find what tickets were in this deploy and mark them as deployed in Sprintly.
if not settings.GITHUB_PERSONAL_TOKEN or not settings.SPRINTLY_API_KEY \
or not settings.SPRINTLY_EMAIL:
print 'Missing required settings for automated deploy.'
justinabrahms / gist:bdcbc7a2da010d7aff6e
Last active Aug 29, 2015
Choose a random, acceptable keg from John's Marketplace in Portland.
View gist:bdcbc7a2da010d7aff6e
from pyquery import PyQuery
import requests
from random import choice
url = ''
query = 'td table tr'
def main():
View git-stash-grep
for i in `git stash list --format="%gd"`; do
git stash show -p $i | grep -H --label="$i" "$1"
justinabrahms /
Created Jul 23, 2014
default pdbpp to start with sticky enabled
import pdb
class Config(pdb.DefaultConfig):
sticky_by_default = True
justinabrahms / gist:5a29d7e74e0620e23f08
Last active Aug 29, 2015
Comparisons of Hay's 2002 translation (bottom) and an older translation on Project Gutenberg (above).
View gist:5a29d7e74e0620e23f08

(Classic Translation)

Of my grandfather Verus I have learned to be gentle and meek, and to refrain from all anger and passion.

From the fame and memory of him that begot me I have learned both shamefastness and manlike behaviour. Of

my mother I have learned to be religious, and bountiful; and to forbear, not only to do, but to intend any evil; to content myself with a spare diet, and to

You can’t perform that action at this time.