Skip to content

Instantly share code, notes, and snippets.

View coderfi's full-sized avatar

Fairiz 'Fi' Azizi coderfi

View GitHub Profile
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.apache.avro.io.BinaryDecoder;
import org.apache.avro.io.BinaryEncoder;
import org.apache.avro.io.DecoderFactory;
/*
* Copyright (c) 2013. Regents of the University of California
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
Instructions for trying ext4+overlay with docker! In an up-to-date SDK:
Write the following to /build/amd64-usr/etc/portage/package.keywords/overlay
sys-kernel/coreos-sources
sys-kernel/coreos-kernel
sys-fs/btrfs-progs
app-emulation/docker
In src/scripts make the following change to switch to ext4:
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
"""
- sequence read
- sequence write
"""
import os
import sys
import time
import errno
{
"metadata": {
"name": "",
"signature": "sha256:5ad7f762e65176fc4319940032d1c0eb966cfa2b28c2b8cd558ad72236fbcdd8"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
<!doctype html>
<html>
<head>
<title>Angular Test </title>
</head>
<body ng-app="d3AngularApp">
<div ng-controller='MainCtrl'>
<div d3-bars bar-height="20" bar-padding="5" data='data'></div>
</div>
@coderfi
coderfi / mysqldb.py
Created October 23, 2015 22:17 — forked from dstolfo/mysqldb.py
luigi.mysqldb.py Luigi module for tracking and writing data to mysql tables.
import luigi
import tempfile
import datetime
from luigi.contrib import rdbms
from lib.luigi import logger
from luigi.postgres import MultiReplacer
try:
import MySQLdb
@coderfi
coderfi / pyformance_registry_carbon_example.py
Created October 29, 2015 04:31
pyformance Registry + Carbon example
#!/usr/bin/env python
from pyformance.reporters import CarbonReporter
from pyformance import MetricsRegistry
from pyformance import timer
import random
import time
@coderfi
coderfi / git-selective-merge.md
Last active November 27, 2015 19:02 — forked from katylava/git-selective-merge.md
git selective merge

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git checkout -b temp