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
const cluster = require('cluster'); | |
const numCPUs = require('os').cpus().length; | |
const express = require('express'); | |
const app = express(); | |
module.exports = app; | |
cluster.on('exit', (worker, code, signal) => { | |
console.log(`Worker ${worker.process.pid} died with code: ${code}, and signal: ${signal}`); | |
console.log('Starting a new worker'); |
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
import { reduce, isFunction, forEach } from 'lodash'; | |
import React, { PureComponent } from 'react'; | |
/** | |
* WithStatePropsFactory is a Higher Order Function that returns a Higher Order Component https://facebook.github.io/react/docs/higher-order-components.html | |
* It is similar to withStateHandlers from recompose https://github.com/acdlite/recompose/blob/master/docs/API.md#withstatehandlers but more versitile b/c it handles https://github.com/acdlite/recompose/issues/443 | |
* It can be used to pass in data from async functions to WrappedComponent as props making them easier to test | |
* initialState | |
* @param {Object} initialState - the initialState of the HOC | |
* @param {Object} lifecycle - lifecycle functions that wont be passed down to the WrappedComponent but will be evaluated in context |
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
{ | |
"Hridayanjali (feat. Swami Pranavamritananda Puri)": { | |
"name": "Hridayanjali (feat. Swami Pranavamritananda Puri)", | |
"mp3": "https://content.cdbaby.com/audio/samples/d073192b/Amma26-01.mp3", | |
"u": "https://store.cdbaby.com/cd/Amma26", | |
"sn": "rieytdlaieyanjatdliey" | |
}, | |
"Nin Tirupatatil (Vintage Version)": { | |
"name": "Nin Tirupatatil (Vintage Version)", | |
"mp3": "https://content.cdbaby.com/audio/samples/d073192b/Amma26-02.mp3", |
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
all items are measured by weight | |
1 part Powdered Sugar | |
1 part finely ground Gram Cracker | |
2 parts Peanut Butter either chunky or smooth | |
1 part Heavy Cream | |
1 part Good Quality Chocolate | |
Mix the powdered sugar, gram cracker, and peanut butter together. spread evenly onto a tray or pan. |
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://aws.amazon.com/message/41926/ | |
Summary of the Amazon S3 Service Disruption in the Northern Virginia (US-EAST-1) Region | |
We’d like to give you some additional information about the service disruption that occurred in the Northern Virginia (US-EAST-1) Region on the morning of February 28th. The Amazon Simple Storage Service (S3) team was debugging an issue causing the S3 billing system to progress more slowly than expected. At 9:37AM PST, an authorized S3 team member using an established playbook executed a command which was intended to remove a small number of servers for one of the S3 subsystems that is used by the S3 billing process. Unfortunately, one of the inputs to the command was entered incorrectly and a larger set of servers was removed than intended. The servers that were inadvertently removed supported two other S3 subsystems. One of these subsystems, the index subsystem, manages the metadata and location information of all S3 objects in the region. This subsystem is necessary to serve all G |
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
.mdl-ripple { | |
background: #000; | |
border-radius: 50%; | |
height: 50px; | |
left: 0; | |
opacity: 0; | |
pointer-events: none; | |
position: absolute; |
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
var async = require('asyncawait/async'); | |
var await = require('asyncawait/await'); | |
console.log("starting") | |
var getSomethingAsync = function(i){ | |
return new Promise((resolve, reject) => { | |
setTimeout(()=>resolve(`money = ${i}`), Math.random()*500) | |
}) | |
} | |
var foo = async(function() { |
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
################################################################### | |
# CONFIGURATION OPTIONS | |
################################################################### | |
# Every item has a default value besides MIRRORS (which is unset). | |
# Use aptitude or apt-get? | |
# Note that for outputting the package URI list, we always use apt-get | |
# ...since aptitude can't do this | |
# Optionally add the FULLPATH to apt-get or apt-rpm or aptitude | |
# e.g. /usr/bin/aptitude |
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
# Check if zplug is installed | |
if [[ ! -d ~/.zplug ]]; then | |
git clone https://github.com/zplug/zplug ~/.zplug | |
source ~/.zplug/init.zsh && zplug update --self | |
fi | |
# Essential | |
source ~/.zplug/init.zsh | |
# Make sure to use double quotes to prevent shell expansion |
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
Flows: | |
create group: | |
1. get timezone, default alert time | |
2. create chore group | |
get group: | |
sign up with email password: | |
1. create user |
NewerOlder