Skip to content

Instantly share code, notes, and snippets.

@mbrenig
mbrenig / snake.py
Last active December 23, 2015 06:49
Runs a simulated game of 3D snakes on a cube, and print frames to a snake.txt that can be copied into code that runs this: http://www.instructables.com/id/The-4x4x4-LED-cube-Arduino/
# Not much fun unless you have one of these:
# http://www.instructables.com/id/The-4x4x4-LED-cube-Arduino/
#
import random
DEBUG = True # Visualize the movement. Hit/hold return to progress the snake
CUBESIZE = 4
ouf = open("snake.txt",'w')
@cfj
cfj / console.reverselog.js
Last active August 21, 2017 10:00
More console.log sillyness
var _log = console.log;
window.console.log = function(log){
_log.call(console, log.reverse ? log.reverse() : typeof log === 'string' ? log.split('').reverse().join('') : typeof log === 'number' ? log.toString().split('').reverse().join('') : typeof log === 'boolean' ? !log : log);
};
@natelandau
natelandau / .bash_profile
Last active November 10, 2024 21:53
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management