- Express:
- express-force-ssl: https://www.npmjs.com/package/express-force-ssl
- express-session: https://www.npmjs.com/package/express-session
- cors: https://www.npmjs.com/package/cors
- compression: https://www.npmjs.com/package/compression
- body-parser: https://www.npmjs.com/package/body-parser
- greenlock-express: https://www.npmjs.com/package/greenlock-express
- helmet: https://github.com/helmetjs/helmet
- hsts: https://github.com/helmetjs/hsts
- GraphQL & Relay
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
// do we have errors? | |
if (condition === false) { | |
return new Error('reason goes here') || Promise.reject(new Error('reason goes here')); // either | |
} | |
// are tasks needed? | |
if (condition === false) { | |
return tasks(); | |
} | |
return Promise.resolve(); |
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
https://www.chriscourses.com/blog/loading-fonts-webpack |
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
https://rutracker.org/forum/viewtopic.php?t=5588079 |
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
https://support.google.com/webmasters/answer/7451184?hl=en |
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
https://stackoverflow.com/questions/6004915/how-do-i-move-a-redis-database-from-one-server-to-another | |
Save a spanshot of the database into a dump.rdb by either running BGSAVE or SAVE from the command line. This will create a file named dump.rdb in the same folder as your redis server. See a list of all server commands. | |
Copy this dump.rdb to the other redis server you want to migrate to. When redis starts up, it looks for this file to initialize the database from | |
--- | |
First, create a dump on server A. |
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 python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
- upsert / merge (data) is called
- validate data with schema
- create transaction
- set new value
- add key to 'sync-queue' list :
[{key, value}]
- publish 'trigger-sync' event
- execute transaction
- worker event listener receives an 'entity-update' event
- if current < limit, spawn a 'sync-worker' instance
- worker executes lua script (STEP A)
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would