Skip to content

Instantly share code, notes, and snippets.

View bhgomes's full-sized avatar
☀️
solar-powered

Brandon H. Gomes bhgomes

☀️
solar-powered
View GitHub Profile
@bhgomes
bhgomes / .travis.yml
Created March 11, 2019 13:56
Conda Travis CI
sudo: false
language: python
dist: xenial
matrix:
include:
- python: 3.3
- python: 3.4
- python: 3.5
- python: 3.6
@bhgomes
bhgomes / bounded.py
Created January 18, 2019 05:07
Bounded Object Wrapper
from wrapt import ObjectProxy
class Bounded(ObjectProxy):
"""
Bounded Object Proxy.
"""
def __init__(self, wrapped, *, minimum=None, maximum=None):
"""Initialized Wrapped Bounded Object."""
@bhgomes
bhgomes / setup.py
Created January 16, 2019 17:06
Sample setup.py that reads from setup.json
# -*- coding: utf-8 -*-
#
# setup.py
#
SETUP_JSON = 'setup.json'
import io
import json
import os
@bhgomes
bhgomes / MakeDatabase.java
Last active October 11, 2020 04:04
JAQL Snippet Example 1: Creating a Database
import bhgomes.jaql.*;
public class MakeDatabase {
public static void main(String[] args) {
// Method 1
Database db1 = JAQL.open("db1", JAQL.SQLITE_DRIVER, "jdbc:sqlite:db1.db");
db1.info("Built a Database with JAQL convenience class");
// Method 2
Database db2 = new Database("db2").open(JAQL.SQLITE_DRIVER, "jdbc:sqlite:db1.db");

Keybase proof

I hereby claim:

  • I am bhgomes on github.
  • I am bhgomes (https://keybase.io/bhgomes) on keybase.
  • I have a public key whose fingerprint is 48E9 34D5 A710 B6EB 94DB B6D0 C642 70EA B633 02DC

To claim this, I am signing this object:

@bhgomes
bhgomes / formula_cookbook.md
Created July 26, 2016 03:06
Formula Cookbook for Homebrew

Formula Cookbook

A formula is a package definition written in Ruby. It can be created with brew create $URL, installed with brew install $FORMULA, and debugged with brew install --debug --verbose $FORMULA. Formulae use the Formula API which provides various Homebrew-specific helpers.

Homebrew Terminology

Term Description Example
Formula The package definition /usr/local/Library/Taps/homebrew/homebrew-core/Formula/foo.rb
Keg The installation prefix of a Formula /usr/local/Cellar/foo/0.1
opt prefix A symlink to the active version of a **