start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Example of Singleton design pattern | |
# Copyright (C) 2011 Radek Pazdera | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
#!/usr/bin/env python | |
"""pagerduty.py | |
Usage: | |
pagerduty.py trigger [options] <description> [<incident_key>] | |
pagerduty.py acknowledge [options] <description> <incident_key> | |
pagerduty.py resolve [options] <description> <incident_key> | |
Options: | |
-c --conf=FILE A path to a config file |
#!/usr/bin/env python | |
from pyspark import SparkContext, SparkConf | |
import urllib2 | |
import json | |
conf = SparkConf().setAppName("ES Search List") | |
sc = SparkContext(conf=conf) | |
url='localhost:9200' |
docker run -d --name es elasticsearch
docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
docker run --link es:elasticsearch -d kibana
LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
import argparse | |
import os | |
import boto3 | |
class S3MultipartUpload(object): | |
# AWS throws EntityTooSmall error for parts smaller than 5 MB | |
PART_MINIMUM = int(5e6) |