Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
require('babel-register') | |
const express = require('express') | |
const React = require('react') | |
const ReactDOMServer = require('react-dom/server') | |
const ReactRouter = require('react-router') | |
const ServerRouter = ReactRouter.ServerRouter | |
const App = require('./src/App').default | |
const path = require('path') | |
const Helmet = require('react-helmet') | |
const compression = require('compression') |
import { PUSH, REPLACE, GO, GO_BACK, GO_FORWARD, LOCATION_CHANGE } from './constants'; | |
export const push = (href) => ({ | |
type: PUSH, | |
payload: href, | |
}); | |
export const replace = (href) => ({ | |
type: REPLACE, | |
payload: href, |
Command | |
`find . -name .git -type d | xargs -n1 -P4 -I% git --git-dir=% --work-tree=%/.. remote update -p` | |
Using -type d prevents execution for ".git" files inside submodules. Using -P4 runs four fetches in parallel to speed things up a bit (and continues to make progress elsewhere if a single repository hangs). I prefer git remote update -p instead of git pull so that I can deal with merge conflicts later or rebase after I'm offline. |
const React = require('react') | |
const Landing = require('./Landing') | |
const Search = require('./Search') | |
const Layout = require('./Layout') | |
const Details = require('./Details') | |
const ReactRouter = require('react-router') | |
const data = require('../public/data') | |
const { Router, Route, hashHistory, IndexRoute } = ReactRouter | |
const Store = require('./Store') | |
const { store } = Store |
// From http://stackoverflow.com/questions/14967647/ (continues on next line) | |
// encode-decode-image-with-base64-breaks-image (2013-04-21) | |
function fixBinary (bin) { | |
var length = bin.length; | |
var buf = new ArrayBuffer(length); | |
var arr = new Uint8Array(buf); | |
for (var i = 0; i < length; i++) { | |
arr[i] = bin.charCodeAt(i); | |
} |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
export function retrieve(nodeId) { | |
return { type: 'RETRIEVE_NODE', payload: { nodeId: nodeId } } | |
} | |
export function show(nodes) { | |
return { type: 'SHOW_NODE', payload: { nodes: nodes } } | |
} |
<?php | |
$redis = new Redis(); | |
$redis->connect( ‘localhost’, 6379 ); | |
print_r($redis->info()); |
sysctl -w fs.file-max=12000500 | |
sysctl -w fs.nr_open=20000500 | |
ulimit -n 4000000 | |
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000' | |
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384' | |
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384' | |
sysctl -w net.core.rmem_max=16384 | |
sysctl -w net.core.wmem_max=16384 | |
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb |