Imagine we have a reducer to control a list of items:
function listOfItems(state: Array<Object> = [], action: Object = {}): Array<Object> {
switch(action.type) {
case 'SHOW_ALL_ITEMS':
return action.data.items
default:
# Export iOS code signing as p12 and mobileprovision file for usage in Appcenter | |
# Manual decryption as described on https://docs.fastlane.tools/actions/match/ | |
desc "Export fastlane match signing credentials for AppCenter" | |
lane :export_code_signing do | |
ensure_env_vars( | |
env_vars: [ | |
"MATCH_GIT_URL", | |
"MATCH_PASSWORD", | |
] |
## | |
# Reverting a range of commits | |
# | |
# git --pretty=oneline --abbrev-commit older_commit..newer_commit # not includes the oldest commit | |
# git --pretty=oneline --abbrev-commit older_commit^..newer_commit # includes the oldest commit | |
## | |
# just to be sure about the commits, list them | |
git log --pretty=oneline --abbrev-commit 1f80548^..4b293d5 |
// @flow | |
// https://github.com/FormidableLabs/react-native-svg-mock | |
import React from 'react'; | |
const createComponent = function(name: string) { | |
return class extends React.Component { | |
// overwrite the displayName, since this is a class created dynamically | |
static displayName = name; |
const axios = require('axios'); | |
const http = require('http'); | |
const https = require('https'); | |
module.exports = axios.create({ | |
//60 sec timeout | |
timeout: 60000, | |
//keepAlive pools and reuses TCP connections, so it's faster | |
httpAgent: new http.Agent({ keepAlive: true }), |
#!/bin/sh | |
# | |
# chkconfig: - 80 45 | |
# description: Starts and stops Kong | |
# Enable: http://manpages.ubuntu.com/manpages/zesty/man8/update-rc.d.8.html | |
# update deamon path to point to the kong executable | |
start() { | |
echo -n "Starting Kong... " | |
kong start |
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)) |
/* | |
* Copyright (C) 2016 Jeff Gilfelt. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
.DS_Store | |
node_modules |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |