Skip to content

Instantly share code, notes, and snippets.


Zearin Zearin

  • Virginia, U.S.A.
View GitHub Profile
mrharel / proxyTrack.js
Created December 28, 2018 14:24
Using Proxy to Track Javascript Class
View proxyTrack.js
const callerMap = {};
function getCaller(error) {
if (error && error.stack) {
const lines = error.stack.split('\n');
if (lines.length > 2) {
let match = lines[2].match(/at ([a-zA-Z\-_$.]+) (.*)/);
if (match) {
return {
name: match[1].replace(/^Proxy\./, ''),
balupton /
Last active April 29, 2019 11:57
DocPad: Use DocPad, GitHub & Prose as a Wiki

Use DocPad, GitHub and Prose as a Wiki

This guide will walk you through how you can use a GitHub repository to house your wiki content, have DocPad render it, and automatically update on changes. It's also really nice as we get to benefit from the github project workflow for our wiki, that is issues, pull requests, etc.

We use this workflow heavily by linking the DocPad Website and the DocPad Documentation repositories allowing us to have users edit and submit pull requests for improvements to our documentation, and once merged, the website regenerates automatically.

1. Create a new repository for your Wiki Content

brandonb927 /
Last active February 24, 2023 20:20
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
caruccio / bash-named-param
Created April 24, 2012 03:25
Named parameters in bash
View bash-named-param
# Do you like python named parameters (kvargs) ?
# Well, you can have it in bash too!!
$ function myfunc() { local $*; echo "foo=$foo, bar=$bar"; }
$ myfunc bar=world foo=hello
foo=hello, bar=world
juanpabloaj /
Created January 25, 2012 00:18
256 terminal colors list
# 256 terminal colors
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
gre / easing.js
Last active March 16, 2023 10:29
Simple Easing Functions in Javascript - see
View easing.js
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
* Easing Functions - inspired from
* only considering the t value for the range [0, 1] => [0, 1]
EasingFunctions = {
bartdag / Java
Created July 7, 2011 19:18
Java and Python and Py4J
View Java
package p1;
import py4j.GatewayServer;
public class MyApplication {
public static void main(String[] args) {
GatewayServer server = new GatewayServer(null);
// This will start the Py4J server and now, the JVM is ready to receive Python commands.
pmuellr / gist:1004413
Created June 2, 2011 13:24
BBEdit Language Module for CoffeeScript
View gist:1004413
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
BBEdit Language Module for CoffeeScript
Put this file in
~/Library/Application Support/BBEdit/Language Modules
or equivalent.
Based off of the examples shipped in the BBEdit SDK.
Zearin / icon-naming-spec.xml
Created May 31, 2011 15:29’s icon naming specification, represented as XML. Intended as a convenience to XML devs.
View icon-naming-spec.xml
<?xml version="1.0" encoding="UTF-8"?>
Zearin <>
I haven’t chosen a license yet. In the meantime, feel free to reuse this
View magic-properties.js
* This library defines magic properties and methods
* for objects. Generic hooks are: __get__, __set__,
* __delete__, __count__, __call__, __construct__,
* __noSuchProperty__ and __noSuchMethod__.
* Used features: Harmony (ES6) proxies.
* Tested in FF4 beta.