Skip to content

Instantly share code, notes, and snippets.

View katychuang's full-sized avatar

Dr. Kat katychuang

View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active May 20, 2025 13:11
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@mango314
mango314 / 1-README.md
Last active January 1, 2016 03:39
Voronoi Tesselation of Random Points on the Unit Square

Voronoi Tesselation

10000 pixels partitions in to 30 regions as follows:

415,  91, 596, 420, 347, 239, 313, 298, 447, 259, 
414, 229, 137, 347, 353, 449, 744, 453, 479, 313, 
362, 363, 494,  87, 343, 395, 327, 140,  62, 285

@cartazio
cartazio / xcode5-haskell-directions.md
Last active May 28, 2019 00:35
xcode 5 + OS X 10.9 mavericks GHC work around nuttiness

PSA :

just use GHC for OSX https://ghcformacosx.github.io

the rest of these directions are preserved for historical purposes

TLDR version, if you have homebrew

xcode-select --install ; brew tap homebrew/versions ;   brew tap homebrew/dupes \
@honza
honza / gist.md
Created June 30, 2013 23:03
Clojure vs Haskell

Haskell vs Clojure

The JSON data is in the following format

{
    "Genesis": {
        "1": {
            "1": "In the beginning..." ,
            "2": "..."
@AWeg
AWeg / CopyAsanaTasks.php
Last active May 28, 2025 00:17 — forked from mhdhejazi/CopyAsanaTasks.php
main changes: - Asana has own SSL cert -> had to add to lines of code - copies subtasks and up to 11 subtasks of subtasks - copies tags -> only tagnames not followers/descriptions
function asanaRequest($methodPath, $httpMethod = 'GET', $body = null)
{
$apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api
$url = "https://app.asana.com/api/1.0/$methodPath";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;
curl_setopt($ch, CURLOPT_USERPWD, $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@willurd
willurd / web-servers.md
Last active May 25, 2025 11:13
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 27, 2025 18:23
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:

@mango314
mango314 / README.md
Last active December 10, 2015 22:38 — forked from mbostock/.block

This choropleth encodes unemployment rates from 2008 with a quantize scale ranging from 0 to 15%. A threshold scale is a useful alternative for coloring arbitrary ranges.

This is a modification of Mike Bostock's example, so single out individual states, picked out using their FIPS code. The State outlines can be also be found on GitHubt @ https://gist.github.com/4090846. A Bottle sever is included, for viewing at home.

from cv import * #bad practice, its just that am bit lazy
def GetThresholdedImage(img):
#returns thresholded image of the blue bottle
imgHSV = CreateImage(GetSize(img), 8, 3)
#converts a BGR image to HSV
CvtColor(img, imgHSV, CV_BGR2HSV)
imgThreshed = CreateImage(GetSize(img), 8, 1)
#InRangeS takes source, lowerbound color, upperbound color and destination
#It converts the pixel values lying within the range to 255 and stores it in
@Nurdok
Nurdok / python_conversion.md
Last active February 5, 2025 05:47
Python Conversion

Python Number Conversion Chart

From To Expression