Skip to content

Instantly share code, notes, and snippets.

Joshua C Elliott jcelliott

Block or report user

Report or block jcelliott

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

Keybase proof

I hereby claim:

  • I am jcelliott on github.
  • I am jelliott ( on keybase.
  • I have a public key ASBLWJywrax6mgI8RZlPvHnBaJ97YJdvRAFOFq1tv0Fcogo

To claim this, I am signing this object:

jcelliott / flatten.exs
Last active Oct 3, 2017
Recursively flatten a list in Elixir
View flatten.exs
defmodule Flatten do
@doc """
Flattens a list by recursively flattening the head and tail of the list
def flatten([head | tail]), do: flatten(head) ++ flatten(tail)
def flatten([]), do: []
def flatten(element), do: [element]
jcelliott /
Last active Oct 11, 2016
Mix task to list information about all dependencies
defmodule Mix.Tasks.Deps.Info do
use Mix.Task
@moduledoc """
Prints information for every dependency from Hex
def run(_args) do
Mix.Dep.loaded([env: :prod])
jcelliott / duration_fmt.go
Created Aug 25, 2014
A small binary to print a duration in milliseconds in a human-friendly format
View duration_fmt.go
package main
import (
const (
MIN = 60
def authorized_for(user, op):
if user[1] == 'admin':
return True
return False
def forbidden():
def check_authorized(operation):
jcelliott / proxy.go
Last active Sep 6, 2017
Reverse proxy using Go
View proxy.go
package main
import (
func main() {
jcelliott /
Created Jan 23, 2014 — forked from glenbot/
Bootstrap file to run Requestbin locally
import os
from requestbin import app
from import MemoryStorage
app.config['bind_address'] = ('', int(os.environ.get("PORT", 5000)))
app.config['ignore_headers'] = """
import argparse
import fileinput
def find_alliteration(line, smallest_seq):
# print("examining line: "+line)
seq = 1
words = line.split()
letter = words[0][0]
# print("looking for: "+letter)
for word in words[1:]:
View concurrency.go
package main
func work(id int, done chan int) {
println("processing top secret document:", id)
done <- id
func main() {
done := make(chan int, 5)
for i := 0; i < 5; i++ {
View duck-typing.go
package main
import "fmt"
type Quacker interface {
type Duck struct{}
You can’t perform that action at this time.