This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Polyfill indexOf. */ | |
var indexOf; | |
if (typeof Array.prototype.indexOf === 'function') { | |
indexOf = function (haystack, needle) { | |
return haystack.indexOf(needle); | |
}; | |
} else { | |
indexOf = function (haystack, needle) { | |
var i = 0, length = haystack.length, idx = -1, found = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"date": "08/08/13", | |
"YoYgrowth": [ | |
null, | |
"35.1%", | |
"37.2%", | |
null | |
], | |
"ticker": "CVT", |
#Simple MongoDB Security Tutorial
###1 - Start mongod without any "security option"
$ mongod --port 27017
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
If applicable, make sure your design component accounts for all these states. This is basically copied from the Nine States of Design Medium article. 😛
- Initial state: What happens before your component does anything? Maybe it’s the first time a user sees it. Maybe it’s not activated yet. Essentially, the component exists but hasn’t started.
- Loading state: Have you accounted for when a user will be waiting for something to happen? What does that look like?
- Empty state: Your component has initialized, but it’s empty. No data. No Items. Now may be a good time to get the user to act (“Do this thing!”), or to reward them (“Good job, everything is taken care of”).
- One state: You have some data. On an input, this may be after the first keystroke. In a list, it might be when you have one item (or one left).
- Some data state: This is usually what you think
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--ease-in-quad: cubic-bezier(.55, .085, .68, .53); | |
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19); | |
--ease-in-quart: cubic-bezier(.895, .03, .685, .22); | |
--ease-in-quint: cubic-bezier(.755, .05, .855, .06); | |
--ease-in-expo: cubic-bezier(.95, .05, .795, .035); | |
--ease-in-circ: cubic-bezier(.6, .04, .98, .335); | |
--ease-out-quad: cubic-bezier(.25, .46, .45, .94); | |
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build app: | |
image: node:6 | |
stage: build | |
artifacts: | |
paths: | |
- public | |
script: | |
- npm install | |
- npm run build | |
# Your next stage won't have access to these files again, so copy it to a public directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wallet is a great app to track your expenses | |
// I just didn't want to buy premium subscription just to export my own data :shrug: | |
// First follow this gist to export all the data in indexeddb to console | |
// https://gist.github.com/harryi3t/d8779d3c0c0c4d41c37fdde81b268fd3 | |
// I will be assuming from here on that the the entire data is in a variable `data` | |
// All the transactions are store in the table 'by-sequence' | |
let sequence = data[2]['by-sequence']; |