Skip to content

Instantly share code, notes, and snippets.

Dan Minshew newswim

Block or report user

Report or block newswim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@newswim
newswim / FlowReactTutorial.js
Created Jun 9, 2018 — forked from busypeoples/FlowReactTutorial.js
Flow Fundamentals For ReactJS Developers
View FlowReactTutorial.js
//
// 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
View gist:80620811d6843ebedad95f51b1715a66
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 / hapijs-rest-api-tutorial.md
Created May 9, 2016 — 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
View hapijs-rest-api-tutorial.md
@newswim
newswim / 56GB.js
Created Nov 5, 2015 — forked from vicapow/56GB.js
Was I really just able to allocate 56GB of memory in Google chrome?
View 56GB.js
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 Oct 22, 2015 — forked from katychuang/remove_brew-mongo_osx.sh
remove mongodb that was installed via brew
View remove_brew-mongo_osx.sh
#!/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
You can’t perform that action at this time.