Skip to content

Instantly share code, notes, and snippets.

@spikeekips
spikeekips / READMD.md
Created August 26, 2015 07:55
Generate SSH secret key without passphrase
$ openssl rsa -in private_key_with_pass_phrase -out private_key_without_pass_phrase
@spikeekips
spikeekips / etcd-cluster.sh
Last active August 29, 2015 13:56
simple `etcd` cluster launch script for latest linux.
#!/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 \
@spikeekips
spikeekips / serf-rpc-client.py
Last active August 29, 2015 13:57
naughty rpc client for `serf` for python
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'
@spikeekips
spikeekips / run-serf-agent.sh
Created March 7, 2014 20:24
simple `serf` agent launch script
#!/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
@spikeekips
spikeekips / serializing-python-object-msgpack-vs-json.ipynb
Last active August 29, 2015 13:57
Comparison Of The Serializing Python Object - msgpack vs. j(b)son
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@spikeekips
spikeekips / locmemcache.py
Created April 23, 2014 09:41
persistant `LocMemCache` without checking expiry.
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):
@spikeekips
spikeekips / gist:d4e2c3eb0e587fc0de07
Last active August 29, 2015 14:01
Send directory using `tar` and `nc`
@spikeekips
spikeekips / parse_unity_build_warnings.py
Created August 1, 2014 09:31
Parse Unity3d error and warning log from file.
# -*- coding: utf-8 -*-
import sys
import re
import csv
import StringIO
WARNINGS = dict(
_never_used_=lambda x : x.get('message').find(' never used') != -1,
@spikeekips
spikeekips / gist:bfaa9216894704d19964
Created April 28, 2015 09:50
Install and Running MySQL in OSX

Install and Running MySQL in OSX

Install MySQL

$  uname -a
Darwin bebop.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
$ xcode-select -v
xcode-select version 2339.
$ brew -v install mysql
@spikeekips
spikeekips / activate_go.sh
Created May 7, 2015 07:20
workspace manager for python virtualenv and golang
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