from http://www.spikelab.org/blog/transfer-largedata-scp-tarssh-tarnc-compared.html
hostA $ tar cf - dir | nc -w1 hostB 6969
hostB $ nc -l -p 6969 | tar xf - -C /tmp/
# -*- coding: utf-8 -*- | |
""" | |
################################################################################ | |
Dump ElasticSearch index for inserting BULK | |
################################################################################ | |
requires `rawes`. | |
for more details, run `-h` to show help message. |
#!/bin/sh | |
n=$1 | |
args=$(echo $@ | sed -e "s/^$1//g") | |
ip=$(ip addr show eth0 | grep '\<inet\>' | awk '{print $2}' | sed -s 's/\/.*//g') | |
./etcd \ | |
-bind-addr=0.0.0.0 \ |
import logging | |
import msgpack | |
import socket | |
import threading | |
import string | |
DEFAULT_IPC_VERSION = 1 | |
DEFAULT_READ_BUFFER_SIZE = 8192 *100 | |
DEFAULT_HOST = '127.0.0.1' |
#!/bin/sh | |
n=$1 | |
args=$(echo $@ | sed -e "s/^$1//g") | |
if [ "$(uname)" == "Darwin" ];then | |
ips=$(ifconfig | grep '\<inet\>' | awk '{print $2}') | |
for i in $ips | |
do | |
echo $i | grep '^127\.' &>/dev/null |
import sys | |
from django.core.cache.backends.locmem import LocMemCache as LocMemCache_django | |
class LocMemCache (LocMemCache_django, ) : | |
def __init__ (self, name, params, ) : | |
params['max_entries'] = sys.maxint | |
super(LocMemCache, self).__init__(name, params, ) | |
def has_key(self, key, version=None): |
from http://www.spikelab.org/blog/transfer-largedata-scp-tarssh-tarnc-compared.html
hostA $ tar cf - dir | nc -w1 hostB 6969
hostB $ nc -l -p 6969 | tar xf - -C /tmp/
# -*- coding: utf-8 -*- | |
import sys | |
import re | |
import csv | |
import StringIO | |
WARNINGS = dict( | |
_never_used_=lambda x : x.get('message').find(' never used') != -1, |
root=$(cd $(dirname ${BASH_SOURCE})/../; pwd) | |
export VIRTUALENV_GO=$root | |
export GOPATH=$VIRTUALENV_GO | |
export GOBIN=$VIRTUALENV_GO/bin | |
export PATH=$VIRTUALENV_GO/bin:$PATH |