Skip to content

Instantly share code, notes, and snippets.

View mrjoelkemp's full-sized avatar

Joel Kemp mrjoelkemp

View GitHub Profile
@dshaw
dshaw / levelup.md
Last active November 17, 2022 14:52
Leveling-up on Node

Core Principals

  • Read lots of code.
  • Write lots of code.
  • Don’t be afraid to throw it away.
  • Don’t be afraid to share it.
  • Find your happy place writing tests.
    • You’ll probably spend more time writing tests and debugging than writing code. Embrace this. Make it a key part of your workflow.
    • Tests are one of the first things I read in a module. That and the example(s). Probably before API docs.
  • Don’t know where to start. Write some tests for a module you like. This benefits everyone.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@bigs
bigs / curry.js
Last active December 13, 2015 17:38
A cute currying function written in pure JavaScript for FUNZIES.
var curry = function (f, args, binding) {
if (typeof f !== 'function' ||
toString.call(args) !== '[object Array]') {
throw new Error('Invalid parameters');
return;
}
if (typeof binding !== 'object') {
binding = this;
}
@ox
ox / gitcal.rb
Created November 14, 2012 04:54
A commit-based calendar. If a commit was made on a day, that day is green, otherwise red.
require 'date'
require 'time'
require 'colored'
time = Date.today
puts time.strftime("%B %Y").center(20)
puts "Su Mo Tu We Th Fr Sa"
sday = Date.new(time.year, time.month, 1)
days_in_month = (Date.new(time.year, 12, 31) << (12-time.month)).day
@HenrikJoreteg
HenrikJoreteg / ajaxfileupload.js
Created April 26, 2012 19:47
AJAX file uploading using jQuery and XMLHttpRequest 2.0 and adding listener for progress updates
// grab your file object from a file input
$('#fileInput').change(function () {
sendFile(this.files[0]);
});
// can also be from a drag-from-desktop drop
$('dropZone')[0].ondrop = function (e) {
e.preventDefault();
sendFile(e.dataTransfer.files[0]);
};
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt