Skip to content

Instantly share code, notes, and snippets.

View jab's full-sized avatar

Joshua Bronson jab

  • 12:01 (UTC -04:00)
View GitHub Profile
@jab
jab / hash_tuple-vs.-hash_incremental.ipynb
Last active December 29, 2016 19:36
hash_tuple vs. hash_incremental
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jab
jab / GIF-Screencast-OSX.md
Created April 29, 2017 02:51 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

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:

@jab
jab / easing.css
Created June 20, 2017 11:59 — forked from bendc/easing.css
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);

Update

Just use https://github.com/ripeworks/iro which gets the challenge below right!

Mac Color Picking Done Right

Picking a Color on Mac is hard. Mainly due to the fact that several applications floating around the web ( AppStore and independant ), grab the color "incorrectly".

Why incorrectly?

@jab
jab / cljs.md
Created November 25, 2018 17:51 — forked from mfikes/cljs.md
cljs command

If you wan't a cljs that acts like clj, but for ClojureScript, there are a few minor changes you can make:

First, add the following entry to ~/.clojure/deps.edn under the :deps key:

org.clojure/clojurescript {:mvn/version "1.10.439"}

Then make copies of clj and clojure named cljs and clojurescript, and put those copies on your path.

@jab
jab / pool.py
Created December 6, 2018 01:53 — forked from ziirish/pool.py
trio Pool primitive
class Pool:
def __init__(self, pool_size):
self._size = pool_size
self.send_channel, self.receive_channel = trio.open_memory_channel(pool_size)
@jab
jab / json_namedtuple.py
Created January 29, 2020 00:04 — forked from Daenyth/json_namedtuple.py
Parse json via python NamedTuple
import hashlib
import json
from decimal import Decimal
from typing import Any, Dict, Type
from typing_inspect import get_args, get_generic_bases, is_generic_type, is_union_type # type: ignore
Json = Dict[str, Any]
@jab
jab / factorial.rkt
Last active July 15, 2020 19:44 — forked from lwhjp/factorial.rkt
#lang racket
;;
;; These are some examples of different ways to compute factorials
;; using various paradigms and features provided by Racket. There
;; are more options available in packages which are not imported
;; by default, but that rabbit hole goes very deep indeed.
;;
;; Comments and suggestions welcome!
;; leo@lwh.jp
@jab
jab / indent.py
Created September 28, 2020 18:46 — forked from xhjkl/indent.py
Indentation context manager
import sys
import functools
import contextlib
@contextlib.contextmanager
def indented_output(indent=4, space=chr(32)):
""" Precede each carriage return with some quantity of spaces.
While nesting `indented_output` contexts, be prepared
@jab
jab / LICENSE.md
Created April 18, 2021 19:20 — forked from joshbode/LICENSE.md
YAML Loader with include constructor (Python 3)

MIT License

Copyright (c) 2018 Josh Bode

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: