start new:
tmux
start new with session name:
tmux new -s myname
| let dbInstance | |
| module.exports = { | |
| getDB() { | |
| if (!dbInstance) { | |
| dbInstance = new Promise((resolve, reject) => { | |
| const openreq = indexedDB.open('picker-db', 2) | |
| openreq.onerror = () => { | |
| reject(openreq.error) |
| import indexedDB from './indexedDB' | |
| if (!indexedDB) { | |
| // console.log("Your browser does not support a stable version of IndexedDB. Some features will not be available.") | |
| } | |
| const DATABASE_NAME = 'db_name'; | |
| const READ_WRITE_PERMISSION = 'readwrite'; | |
| /** | |
| * From the W3C working draft | |
| * http://www.w3.org/TR/IndexedDB | |
| */ | |
| // synchronously set properties on a database and retrieve a record | |
| var db = indexedDB.open('books', 'Book store', false); | |
| if (db.version !== '1.0') { | |
| var olddb = indexedDB.open('books', 'Book store'); |
| /*! | |
| * indexedDB Plugin v0.0.1 | |
| * License: https://github.com/ParkMinKyu/diary/blob/master/LICENSE | |
| * (c) 2017 niee | |
| */ | |
| var IndexedDB = { | |
| indexedDB: window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB, | |
| schemaName: null, | |
| dataBaseName: null, | |
| checkDB: function () { |
| Apache Cheat Sheet | |
| Setup a Virtual Domain | |
| NameVirtualHost * | |
| <VirtualHost *> | |
| DocumentRoot /web/example.com/www | |
| ServerName www.example.com | |
| ServerAlias example.com | |
| CustomLog /web/example.com/logs/access.log combined |
| ; cli configs | |
| long = true | |
| registry = "https://registry.npmjs.org/" | |
| ; userconfig /home/gabriel/.npmrc | |
| prefix = "/home/gabriel/.npm" | |
| ; default values | |
| always-auth = false | |
| bin-links = true |
| sudo amazon-linux-extras install epel -y | |
| sudo yum install stress -y |