Skip to content

Instantly share code, notes, and snippets.

@silasdavis
silasdavis / MultipleOutputs.scala
Last active January 18, 2022 07:07
Wrapping OutputFormat to produce multiple outputs with hadoop MultipleOutputs
/**
* This file contains the core idea of wrapping an underlying OutputFormat with an OutputFormat
* with an augmented key that writes to partitions using MultipleOutputs (or something similar)
*/
package model.hadoop
import model.hadoop.HadoopIO.MultipleOutputer
import model.hadoop.HadoopIO.MultipleOutputer._
import org.apache.hadoop.io.{DataInputBuffer, NullWritable}
@silasdavis
silasdavis / human-bytes.sh
Created August 6, 2015 13:06
Convert integral bytes ot human friendly format. Reads number of bytes from stdin or argument or both using '-' for replacement
#!/bin/bash
function human-bytes {
numfmt --to=iec-i --suffix=B --padding=7 "$@"
}
if [ "$#" -eq 0 ]
then
# Is stdin a terminal?
if [ -t 0 ]; then
### Keybase proof
I hereby claim:
* I am silasdavis on github.
* I am silasdavis (https://keybase.io/silasdavis) on keybase.
* I have a public key whose fingerprint is 2CA0 CB4E 5A30 AFDE 9D3E FB9B 4CBF D0FF 2D39 5219
To claim this, I am signing this object:
@silasdavis
silasdavis / LibReturnerTest.sol
Created September 29, 2016 12:17
Libraries call fails, e-pm 212
library Returner {
// Struct definitions used in Jan's Mappings library
struct B32AddressMap {
mapping (bytes32 => AddressElement) rows;
}
struct AddressElement {
address value;
}
github.com/BurntSushi/toml
github.com/bugsnag/bugsnag-go
github.com/bugsnag/panicwrap
github.com/kardianos/osext
github.com/bugsnag/bugsnag-go/errors
github.com/docker/docker/pkg/archive
github.com/opencontainers/runc/libcontainer/system
github.com/docker/docker/pkg/system
golang.org/x/sys/windows
github.com/docker/go-units
@silasdavis
silasdavis / epm.yaml
Last active May 5, 2017 15:07
selfdestruct issue
jobs:
- name: deployMortal
job:
deploy:
contract: mortal.sol
- name: callMortal
job:
call:
@silasdavis
silasdavis / BTT-19.gpx
Created June 1, 2017 14:02
Route I imported into movescount
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="Geomapa Alt Pirineu i Aran" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensions/v3/GpxExtensionsv3.xsd http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata>
<link href="http://inforutes.parcolimpic.cat/rutes-btt/serra-darfa.-mas-den-planes-ca"><text>Serra d'Arfa - Mas d'en Planes (BTT)</text></link>
</metadata>
<trk><name>Serra d'Arfa - Mas d'en Planes (BTT)</name>
<trkseg>
<trkpt lat="42.3540700079855" lon="1.463040110325"></trkpt>
<trkpt lat="42.3537500079859" lon="1.46213011032489"></trkpt>
<trkpt lat="42.3533500079863" lon="1.46122011032469"></trkpt>
@silasdavis
silasdavis / monax-js-getting-started.md
Last active December 21, 2017 14:42
Monax JS libs tutorial

layout: single title: "Tutorials | Getting Started" aliases:

  • /docs menu: tutorial: weight: 5
This file has been truncated, but you can view the full file.
{
"log": {
"version": "1.1",
"creator": {
"name": "Firefox",
"version": "61.0.1"
},
"browser": {
"name": "Firefox",
"version": "61.0.1"
{
"log": {
"version": "1.1",
"creator": {
"name": "Firefox",
"version": "61.0.1"
},
"browser": {
"name": "Firefox",
"version": "61.0.1"