Observables are producers that can return many values asynchronously
Producers determine when the values are sent (PUSH)
Observable executions are NOT shared
setTimeout(() => foo.subscribe)
foo.subscribe
| /* globals localStorage */ | |
| import { onSnapshot, applySnapshot } from 'mobx-state-tree'; | |
| import Storage from './storage'; | |
| export const persist = (name, store, options, schema = {}) => { | |
| let hydrated = false; | |
| let storage = options.storage; | |
| if (typeof localStorage !== 'undefined' && localStorage === storage) { |
| /** | |
| * Consume update args object for document and can handle one level nesting. | |
| * Returns object for leverage by $set in Mongoose update function. | |
| * | |
| * @param args | |
| * @returns {{}} | |
| */ | |
| const objectToDotNotation = (args) => { | |
| const setObject = {}; | |
| Object.keys(args).forEach((key) => { |
Pitchfork’s Product team is hiring. We're looking for a sharp, creative front-end developer excited about pushing hard on UI and UX across all platforms. Your work will be seen daily by millions around the world, and you'll be a part of a small team of designers and developers whose work has been praised for redefining online music journalism and influencing the medium itself.
Our work environment is fast-paced and intimate: we all work very closely, and everyone has say in new ideas, features, and approach. You should be someone constantly learning about new technology and keenly aware of its practical applications and limitations. It should go without saying that you’re willing to take on any task, regardless of size or glory. Everyone here wears many hats, and no job is too small for anyone. Strong communication skills are a must, as is the desire to teach as much as you learn. A love for music doesn’t hurt, either.
As part of Pitchfork’s Product team, you will help us
| #!/bin/bash | |
| # Sign a file with a private key using OpenSSL | |
| # Encode the signature in Base64 format | |
| # | |
| # Usage: sign <file> <private_key> | |
| # | |
| # NOTE: to generate a public/private key use the following commands: | |
| # | |
| # openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048 | |
| # openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem |
| const I = x => x | |
| const K = x => y => x | |
| const A = f => x => f (x) | |
| const T = x => f => f (x) | |
| const W = f => x => f (x) (x) | |
| const C = f => y => x => f (x) (y) | |
| const B = f => g => x => f (g (x)) | |
| const S = f => g => x => f (x) (g (x)) | |
| const S_ = f => g => x => f (g (x)) (x) | |
| const S2 = f => g => h => x => f (g (x)) (h (x)) |
| /* | |
| * var person = { firstName: 'bill', lastName: 'johnson' } | |
| * | |
| * person = _.rename(person, 'firstName', 'first') | |
| * person = _.rename(person, 'lastName', 'last') | |
| * | |
| * console.log(person) // { first: 'bill', last: 'johnson' } | |
| */ | |
| _.rename = function(obj, key, newKey) { |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| zmq = require("zmq") | |
| fs = require("fs") | |
| var config = JSON.parse(fs.readFileSync(process.argv[2])) | |
| var connexion = "tcp://"+config.ip+":" | |
| var shell_conn = connexion+config.shell_port | |
| var pub_conn = connexion+config.iopub_port | |
| var hb_conn = connexion+config.hb_port |