Skip to content

Instantly share code, notes, and snippets.

View mafrosis's full-sized avatar
🍳

Matt Black mafrosis

🍳
  • MACHIN SHIN
  • Melbourne, Australia
View GitHub Profile
@mafrosis
mafrosis / EC2.py
Created July 17, 2012 02:46
Draft of changes to salt-cloud EC2.py
'''
The generic libcloud template used to create the connections and deploy the
cloud virtual machines
'''
# Import python libs
import os
import sys
import subprocess
#!/usr/bin/ruby
#
# This script fixes /usr/local only.
#
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
@mafrosis
mafrosis / Screenshot_2013-05-02-18-05-21.jpg
Last active December 16, 2015 21:39
MPDroid Album Grid Library view
Screenshot_2013-05-02-18-05-21.jpg
@mafrosis
mafrosis / serial_mon.py
Created May 17, 2013 21:41
Arduino serial port monitor
#! /usr/bin/env python
import serial
import time
PORT = "/dev/tty.usbmodemfd1121"
RECONNECT_SLEEP = 5
MONITOR_SLEEP = 0.2
@mafrosis
mafrosis / gist:7456240
Created November 13, 2013 20:55
config.log from failed ncmpcpp install
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/ncmpcpp/0.5.10 --with-taglib --with-curl --enable-unicode
## --------- ##
## Platform. ##
@mafrosis
mafrosis / rethinkdb_setup_osx.md
Last active January 30, 2018 01:31
RethinkDB Setup on OSX

RethinkDB Setup on OSX

This guide will get RethinkDB setup and running with a default configuration on OSX. There is also an option for setting RethinkDB to start at boot time on OSX, and a note on upgrading to a more recent RethinkDB version.

First Installation

Install Homebrew if you don't already have it:

@mafrosis
mafrosis / rethinkdb_boomerang.md
Last active August 29, 2015 14:01
RethinkDB with Boomerang Data

RethinkDB with Boomerang Data

This guide will get you up and running with a Boomerang dataset, and subsequently run through a couple of small queries using RethinkDB.

Get A Dataset

Create a working directory:

{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/approve_schema.json",
"title": "portal_approve",
"description": "A description",
"type": "object",
"properties": {
"name": {
"description": "The contact's full name",
"type": "string"
@mafrosis
mafrosis / db.py
Last active August 11, 2016 07:36
Flask-Alembic sans Flask-SqlAlchemy
from flask import g
from flask import current_app as app
from flask_alembic import Alembic
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
2017/03/30 11:15:35 [INFO] Packer version: 1.1.0-rc2 (7866d7df149f8ce5accb9e250c0576866d1b7333+CHANGES)
2017/03/30 11:15:35 Packer Target OS/Arch: darwin amd64
2017/03/30 11:15:35 Built with Go Version: go1.8
2017/03/30 11:15:35 Detected home directory from env var: /Users/mafro
2017/03/30 11:15:35 Using internal plugin for oneandone
2017/03/30 11:15:35 Using internal plugin for vmware-vmx
2017/03/30 11:15:35 Using internal plugin for amazon-ebssurrogate
2017/03/30 11:15:35 Using internal plugin for azure-arm
2017/03/30 11:15:35 Using internal plugin for googlecompute
2017/03/30 11:15:35 Using internal plugin for hyperv-iso