Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
- No Linting
Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
// this function takes an array of date ranges in this format: | |
// [{ start: Date, end: Date}] | |
// the array is first sorted, and then checked for any overlap | |
function overlap(dateRanges){ | |
var sortedRanges = dateRanges.sort((previous, current) => { | |
// get the start date from previous and current | |
var previousTime = previous.start.getTime(); | |
var currentTime = current.start.getTime(); |
As compiled by Kevin Wright a.k.a @thecoda
(executive producer of the movie, and I didn't even know it... clever huh?)
please, please, please - If you know of any slides/code/whatever not on here, then ping me on twitter or comment this Gist!
This gist will be updated as and when I find new information. So it's probably best not to fork it, or you'll miss the updates!
Monday June 16th
#include <stdint.h> | |
#include <stdlib.h> | |
// assert(RAND_MAX >= 0x7fff) | |
float | |
random_0_to_1() { | |
union { | |
uint32_t d; | |
float f; | |
} u; |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
var collectionNames = db.getCollectionNames(), stats = []; | |
collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); | |
stats = stats.sort(function(a, b) { return b['size'] - a['size']; }); | |
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
dateFullyear : Digit{4}; | |
dateMonth : Digit{2}; | |
dateMday : Digit{2}; | |
timeHour : Digit{2}; | |
timeMinute : Digit{2}; | |
timeSecond: Digit{2}; | |
timeSecfrac : '.' Digit{1,}; | |
timeNumOffset : ('+' | '-') timeHour ':' timeMinute; | |
timeOffset: 'Z' | timeNumOffset; | |
partialTime : timeHour ':' timeMinute ':' timeSecond timeSecfrac?; |
# default.custom.yaml | |
# save it to: | |
# ~/.config/ibus/rime (linux) | |
# ~/Library/Rime (macos) | |
# %APPDATA%\Rime (windows) | |
patch: | |
schema_list: | |
- schema: luna_pinyin # 朙月拼音 | |
- schema: luna_pinyin_simp # 朙月拼音 简化字模式 |