Skip to content

Instantly share code, notes, and snippets.

View newswim's full-sized avatar
🦬
Hi

Dan Minshew newswim

🦬
Hi
View GitHub Profile
@newswim
newswim / FlowReactTutorial.js
Created June 9, 2018 18:36 — forked from busypeoples/FlowReactTutorial.js
Flow Fundamentals For ReactJS Developers
//
// MIT License
//
// Copyright (c) 2018 Ali Sharif
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@newswim
newswim / gist:80620811d6843ebedad95f51b1715a66
Last active August 6, 2016 00:48 — forked from FrancescaK/gist:3832833
Password Testing Scenario
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
bcrypt = require('bcrypt'),
SALT_WORK_FACTOR = 10;
var UserSchema = new Schema({
username: { type: String, required: true, index: { unique: true } },
password: { type: String, required: true }
});
@newswim
newswim / JavaScript--The-Good-Parts.md
Created July 14, 2016 22:22
JavaScript code walkthroughts from Douglas Crockfords' book
@newswim
newswim / hapijs-rest-api-tutorial.md
Created May 9, 2016 15:31 — forked from agendor/hapijs-rest-api-tutorial.md
A practical introduction to building a RESTful API with the hapi.js server framework for Node.js
@newswim
newswim / 56GB.js
Created November 5, 2015 04:50 — forked from vicapow/56GB.js
Was I really just able to allocate 56GB of memory in Google chrome?
var x = [];
for (var i = 0; i < 56; i++) {
x.push(new Uint8Array(1024 * 1024 * 1024));
}
console.log(x.length);
@newswim
newswim / remove_brew-mongo_osx.sh
Created October 22, 2015 12:53 — forked from katychuang/remove_brew-mongo_osx.sh
remove mongodb that was installed via brew
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
launchctl remove homebrew.mxcl.mongodb
pkill -f mongod