Skip to content

Instantly share code, notes, and snippets.

View daywong1119's full-sized avatar
🎯
Focusing

Dave Wong daywong1119

🎯
Focusing
  • Minus + | Here We Seoul
  • Hong Kong
View GitHub Profile
@benpickles
benpickles / action.js
Created March 18, 2016 16:19
Inject an Authorization header into a redux-api-middleware request with a Redux middleware.
import { CALL_API } from 'redux-api-middleware'
export function fetchLocations() {
return {
[CALL_API]: {
endpoint: 'http://api.somesite.com/api/locations',
method: 'GET',
// Don't have to manually add the Authorization header to every request.
headers: { 'Content-Type': 'application/json' },
types: ['REQUEST', 'SUCCESS', 'FAILURE']
@coder4web
coder4web / php7_memcached_src.sh
Last active December 18, 2018 09:31
PHP 7 with Memcached from source
# -------------------------------------------------------
# STEP 1: install requirements
# -------------------------------------------------------
# CentOS / RHEL / Amazon EC2 AMI:
# @see https://webtatic.com/packages/php70/
sudo yum install php70w php70w-devel
sudo yum groupinstall "Development Tools"
sudo yum install libmemcached libmemcached-devel zlib zlib-devel
# -------------------------------------------------------
# Debian