Skip to content

Instantly share code, notes, and snippets.

View JonDum's full-sized avatar
🕶️

Jonathan Dumaine JonDum

🕶️
  • Dumstruck Digital
  • Scottsdale, AZ
View GitHub Profile
@JonDum
JonDum / DatabaseHelper.js
Created September 16, 2011 22:07
Simple helper & Express/Connect session_store implementation for Mongolian.
var Mongolian = require("mongolian");
bson = require('mongodb').BSONPure;
/**
* DatabaseHelper defines database collections and handles connect to the database.
*
* Usage:
@JonDum
JonDum / Point-concise.js
Created September 17, 2011 20:21
Suggestion for how JS class syntax should be
class Point {
public x, y;
Point(x, y)
{
this.x = x;
this.y = y;
}
@JonDum
JonDum / function-alloc-bench.js
Created November 27, 2012 22:30
Anonymous function allocation benchmark
//usage
// node test.js --nouse-idle-notification -test1
// node test.js --nouse-idle-notification -test2
// then compare memory usage
var a = [];
function Test1()
{
#!/usr/bin/env bash
# IMPORTANT: Run this script from /home/<USER>/ directory: bash -c "$(curl SCRIPT_URL)"
# (optional): Preparing the environment if you want to install zen from source:
# Once you get the VM up and running you need to login with your root account and run below commands.
# apt-get update && apt-get upgrade -y
# apt-get install -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libgtk2.0-dev && apt-get autoremove -y
#!/usr/bin/env bash
# IMPORTANT: Run this script from /home/<USER>/ directory: bash -c "$(curl SCRIPT_URL)"
# (optional): Preparing the environment if you want to install zen from source:
# Once you get the VM up and running you need to login with your root account and run below commands.
# apt-get update && apt-get upgrade -y
# apt-get install -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libgtk2.0-dev && apt-get autoremove -y
@JonDum
JonDum / dd-afk.ahk
Created November 11, 2011 04:14
Dungeon Defenders AFK script
;
; Usage: Save to a .ahk file
;
; Control+Shift+G to activate hitting G once a second
; Control+Alt+G to deactivate
; Control+C to close the script completely
;
active=0
@JonDum
JonDum / layout.styl
Created February 10, 2015 23:40
Stylus Flexbox layout helper
/*
This helper function simplifies some of the flexbox
terminology. There are some layouts too advanced for this,
but in the majority of times this saves a lot of typing.
It's written with left, center, right always referring to
the horizontal axis, and top, middle, bottom always referring
to the vertical axis. 'reverse' is not supported because it
would make the helper way too complicated and hurt your brain.