Skip to content

Instantly share code, notes, and snippets.

View kriscooke's full-sized avatar

kriscooke

  • British Columbia, Canada
View GitHub Profile
@kriscooke
kriscooke / atob.js
Created June 18, 2020 04:46 — forked from jmshal/atob.js
Node.js ponyfill for atob and btoa encoding functions
module.exports = function atob(a) {
return new Buffer(a, 'base64').toString('binary');
};
@kriscooke
kriscooke / atob.js
Created June 18, 2020 04:46 — forked from jmshal/atob.js
Node.js ponyfill for atob and btoa encoding functions
module.exports = function atob(a) {
return new Buffer(a, 'base64').toString('binary');
};
@kriscooke
kriscooke / git-mv-with-history
Created May 6, 2016 01:10 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@kriscooke
kriscooke / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

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

On the road to being a Power User

Take control of your development environment by using more of the keyboard and less of the mouse/trackpad. As you write your code, use (Mac and Sublime) keyboard commands/shortcuts to, well... kill it!

Mastering your text editor and Operating System (OS) will make you a more efficient and impressive developer.

Power User Commands

Don't just read about these. If any of these are foreign / unfamiliar to you, be sure to practice them and make a mental note to use them when possible.