Skip to content

Instantly share code, notes, and snippets.

View mason-bially's full-sized avatar

Mason Bially mason-bially

View GitHub Profile
@mason-bially
mason-bially / ob1_issue_labels.py
Last active June 1, 2017 09:11
Issue Label Manager for OB1 Projects.
import argparse
import urllib
import pathlib
def require(module, package=None):
import importlib
try:
importlib.import_module(module)
except ImportError:
import pip
@mason-bially
mason-bially / static-init-example.cpp
Last active August 29, 2015 14:15
Static initalization example.
#include <map>
#include <memory> // std::unique_pointer
#include <iostream> // For Printing
// Declare ahead of time so we can refrence it.
class TestBase;
// Container of objects we want to initalize.
class TestContainer
{

Keybase proof

I hereby claim:

  • I am mason-bially on github.
  • I am mason_bially (https://keybase.io/mason_bially) on keybase.
  • I have a public key whose fingerprint is 8E81 528E 0885 9971 1173 CB81 662E F5A1 F4CB AFB9

To claim this, I am signing this object:

@mason-bially
mason-bially / horrible_c_hack.c
Created December 5, 2013 02:44
A horrible C hack for inline string embedded languages.
// build: $ gcc horrible_c_hack.c
#include<stdio.h>
#define MULTILINE_SHADER(v, ...) v#__VA_ARGS__
char const * vert_shader = MULTILINE_SHADER(
"#version 150\n",
in vec3 position;
void main() {
@mason-bially
mason-bially / reveal-js-init-example.js
Last active December 14, 2015 04:09
A quick highlighting of a useful reveal.js initialization code example.
<script>
// Something like the following line needs to be changed:
Reveal.initialize({
// Other options
// ...
// And then change this line:
dependencies: [
// Just add this line and change the location below:
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
]
@mason-bially
mason-bially / JACoP_Auto_.py
Created June 3, 2012 20:07 — forked from philipbjorge/JACoP_Auto_.py
JACoP Fiji Colocalization Automation
from ij import IJ
from ij import Prefs
from ij import WindowManager as wm
from ij import ImagePlus
from java.lang import Boolean
import time
def setup_jacop():
"""