Skip to content

Instantly share code, notes, and snippets.

Working on a super-secret, top-notch project

Isaac Whitfield whitfin

Working on a super-secret, top-notch project
Block or report user

Report or block whitfin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
whitfin / Cargo.toml
Last active Mar 1, 2019
Example of piping request body to a file in Gotham
View Cargo.toml
name = "gotham_request_pipe"
version = "0.1.0"
authors = ["Isaac Whitfield <>"]
edition = "2018"
gotham = "0.3"
hyper = "0.12"
tokio = "0.1"
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libimobiledevice(AutotoolsPackage):
"""Library to communicate with iOS devices natively."""

Keybase proof

I hereby claim:

  • I am whitfin on github.
  • I am whitfin ( on keybase.
  • I have a public key ASBIcyeqhID9fEJiNyYMaKpyS67OGMiNNXGibXxQ8Hzzngo

To claim this, I am signing this object:

package com.appcelerator.binding;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class Broadcaster {
private static final Map<String, List<Listener>> LISTENERS = new ConcurrentHashMap<>();
View promises_for_noopkat.js
.then(function () {
return client.get(); // return your promise
.then(function (result) {
// result is the return of client.get()
.catch(function (err) {
// common handler for any broken promise now
whitfin / poor_persons_with.exs
Last active Sep 6, 2016
If you're working against Elixir v1.1, here's a simple (single tier) with statement
View poor_persons_with.exs
defmodule MyModule do
defmacro exec_with(left, right, do: fun) do
quote do
case unquote(right) do
unquote(left) ->
v -> v
View elasticsearch.js
module.exports = {
image: 'elasticsearch',
binds: [
ports: [
View center_mdown.js
exports.parse = function parse(mdown) {
console.log('<p align="center" style="margin: 2em auto auto auto; width:70%;">');
mdown.match(/\[\!.*?\)\].*?\)/g).forEach(function (badge) {
var segments = badge.match(/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/);
var altText = segments[1];
var svgPath = segments[2];
var urlHref = segments[3];
console.log(` <a href="${urlHref}">`);
whitfin /
Created Sep 19, 2015
Collecting to a Jackson ArrayNode from a Java 8 Stream.
package com.zackehh.example;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import java.util.EnumSet;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
whitfin /
Created May 10, 2014
A simple Thread extension to control a redirection of an InputStream to an OutputStream.
package com.zackehh.example;
* A Thread extension dedicated to redirecting InputStreams
* to given OutputStreams. Feeds into the given OutputStream
* during the lifetime of this Thread.
You can’t perform that action at this time.