Skip to content

Instantly share code, notes, and snippets.


Justin Abrahms justinabrahms

View GitHub Profile
justinabrahms /
Created Jun 25, 2020
item parser for
import re
from hashlib import sha256
class Item(object):
def __init__(self, item):
self.item = item
def __str__(self):
return self.item['name']
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