Skip to content

Instantly share code, notes, and snippets.

@chunpin
chunpin / momtest.md
Created October 27, 2023 08:17 — forked from spartonia/momtest.md
Summary if The Mom Test book.

Mom Test Notes

Chapter 1: The mom test

Bad/Good Questions

Bad: "Do you think it;s a good idea?"
Fix: You might ask them to show you how they currently do their job. Talk about which parts they love and hate. Ask which other tools and
processes they tried before settling on this one. Are they actively searching for a replacement? If so, what’s the sticking point? If not, why not? Where are they losing money with their current tools? Is there a budget for better

@chunpin
chunpin / pubsub.js
Last active May 19, 2019 09:26 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
//There are also a lot of more library with complex features, search for key word "Javascript Event Library"
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
@chunpin
chunpin / 0_reuse_code.js
Created September 17, 2017 16:41
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
@chunpin
chunpin / console.log fallback
Created July 11, 2017 07:40 — forked from allentong/console.log fallback
Console.Log Fallback for Javascript
var alertFallback = false;
if (typeof console === "undefined" || typeof console.log === "undefined") {
console = {};
if (alertFallback) {
console.log = function (msg) {
alert(msg);
};
} else {
console.log = function () { };
}
@chunpin
chunpin / install-mongodb.md
Created May 12, 2016 05:03 — forked from adamgibbons/install-mongodb.md
Install MongoDB on Mac OS X 10.9

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@chunpin
chunpin / footer.js
Created January 14, 2016 21:24 — forked from daverogers/footer.js
Assign "active" class to navbar item based on current page URL with jQuery