Skip to content

Instantly share code, notes, and snippets.

View joyrexus's full-sized avatar

J. Voigt joyrexus

View GitHub Profile
@nmerouze
nmerouze / main.go
Last active May 6, 2021 16:40
Example for "Build Your Own Web Framework in Go" articles
package main
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
"time"

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@igstan
igstan / state-monad.coffee
Created April 22, 2011 11:57
State Monad in CoffeeScript
push = (element) -> (stack) ->
newStack = [element].concat stack
{value: element, stack: newStack}
pop = (stack) ->
element = stack[0]
newStack = stack.slice 1
{value: element, stack: newStack}
bind = (stackOperation, continuation) -> (stack) ->
@mbostock
mbostock / .block
Last active June 16, 2019 03:59
Creating Thumbnails with GraphicsMagick
license: gpl-3.0
@shesek
shesek / callable.coffee
Last active January 14, 2019 15:37
Decorate constructor functions, and have them return a callable object that delegates to a `callable()` method when invoked.
##########
### Moved to https://github.com/shesek/callable-klass
##########
"use strict"
# without strict mode, `this` defaults to window, so `(this?obj)`
# would always return window.
callable = (ctor) ->
@inokappa
inokappa / taskRunner.go
Created July 14, 2017 22:08
Go で実装した AWS Step Function の Activity Worker
package main
import (
"fmt"
"log"
"flag"
"os"
"os/exec"
"encoding/json"
"github.com/aws/aws-sdk-go/service/sfn"
@hugooliveirad
hugooliveirad / git-sync-fork.sh
Created February 21, 2014 21:33
Sync Fork On GitHub
# Sync fork with original repository
#
# Requires an "upstream" remote, pointing to original repo
# e.g. `git remote add upstream git@github.com:user/repo.git`
alias git-sync-fork="git fetch upstream; git checkout master; git merge upstream/master"
{
"hands": [
{
"direction": [
0.187837,
0.097272,
-0.976745
],
"id": 3,
"palmNormal": [
@ryanflorence
ryanflorence / Base.coffee
Created September 9, 2012 01:06
Base CoffeeScript Class, surprisingly useful.
################################################################################
# script: Base.coffee
# author: Ryan Florence <rpflorence@gmail.com>
# license: MIT-Style License
#
# A surprisingly useful base class for CoffeeScript. Inspired by my old
# friend, MooTools Class. Provides default options, mixins, and custom events.
class Base
defaults: {}
@josephspurrier
josephspurrier / httprouterwrapper.go
Last active April 13, 2017 16:08
Golang - Making julienschmidt/httprouter compatible using gorilla/context
// Source: http://nicolasmerouze.com/guide-routers-golang/
// Package httprouterwrapper allows the use of http.HandlerFunc compatible funcs with julienschmidt/httprouter
package httprouterwrapper
import (
"net/http"
"github.com/gorilla/context"
"github.com/julienschmidt/httprouter"