Skip to content

Instantly share code, notes, and snippets.


Brahm Lower bplower

View GitHub Profile
bplower / Main.hs
Created Mar 21, 2018
Short circuiting a chain of operations in Haskell
View Main.hs
module Main where
import Control.Monad.Except
, runExceptT
, throwError
import Control.Monad.IO.Class ( liftIO )
bplower /
Created Feb 15, 2017
Automatic TestCase creation for rst literal_block shell examples in python class docstrings
import sys
import unittest
from docutils.core import publish_doctree
import subprocess
import opendir_dl
class ShellTestCase(unittest.TestCase):
def assert_shell_yields(self, command, expected_result):
result = subprocess.check_output(command, shell=True)[:-1]
if result != expected_result:
import urllib2
import json
last_timestamp_utc = 0
reddit_api = ''
page_request = urllib2.urlopen(reddit_api)
page_content = json.loads(
posts = page_content['data']['children']
# API results are in order of newest to oldest, but we want to
import threading
import SocketServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import httplib2
class QuietSimpleHTTPRequestHandler(SimpleHTTPRequestHandler):
"""Quiet http request handler
Subclasses SimpleHTTPRequestHandler in order to overwrite the log_message
method, letting us reduce output generated by the handler. Only standard
messages are overwritten, so errors will still be displayed.
bplower /
Last active Sep 18, 2016
Dynamic property assignment with default custom get and set methods
# This example implementation is *extremely* similar to what is being asked and
# answered on the following stack overflow page:
# Simply running this script will return the following output, which follows
# a story told through inline comments.
# user@debian:~$ ./
bplower / phpVirtualBox Debian 8 Install Script
Last active Nov 8, 2017
This is a script to install VirtualBox and phpVirtualBox on a headless Debian 8 machine.
View phpVirtualBox Debian 8 Install Script
# Author: Brahm Lower
# Name: phpVirtualBox Debian 8 Install Script
# Source:
# Prerequisite Packages:
# bash, openssl, cat, grep, echo, wget, apt-key, apt-get, useradd, usermod, passwd, mv, cp, sed, systemctl
# Installed Packages:
# build-essential, dkms, unzip, apache2, php5, php5-mysql, libapache2-mod-php5, php-soap, virtualbox-5.0
# Description:
# This is a script to install VirtualBox and php VirtualBox on a headless Debian 8 machine.
bplower /
Last active Apr 20, 2020
This is installation documentation for installing Koel on Debian 8.

Installation on Debian 8

This is installation documentation for installing Koel on Debian 8.

Install Dependancies

Most packages can be installed via apt-get.

user@debian:~/$ sudo apt-get install -y apache2 mysql-server php5 php5-mysql g++ git curl



Keybase proof

I hereby claim:

  • I am bplower on github.
  • I am bplower ( on keybase.
  • I have a public key whose fingerprint is 9397 76F4 F064 4FD2 955D 0511 1ECD 50E2 4027 9A7E

To claim this, I am signing this object: