This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Modified TMUX start script from: | |
# http://forums.gentoo.org/viewtopic-t-836006-start-0.html | |
# | |
# Store it to `~/bin/tmx` and issue `chmod +x`. | |
# | |
# Works because bash automatically trims by assigning to variables and by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mrjob.job import MRJob | |
from mrjob.step import MRStep | |
class MRCountingJob(MRJob): | |
def __init__(self, *args, **kwargs): | |
super(MRCountingJob, self).__init__(*args, **kwargs) | |
def steps(self): | |
# 3 steps so we can check behavior of counters for multiple steps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stdlib | |
import re | |
import urllib2 | |
import urlparse | |
# project | |
from util import headers | |
from checks import AgentCheck | |
from checks.utils import add_basic_auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
JOB_FLOW_ID=`mrjob create-job-flow` | |
for n in `seq 1 ${LOOP_NUMBER}` | |
do | |
python ${MRJOB_SCRIPT} -r emr --conf-path emr.conf --emr-job-flow-id=${JOB_FLOW_ID} ${MRJOB_OPTION} ${INPUT_DIR} > ${OUTPUT_FILE} | |
done | |
mrjob terminate-job-flow ${JOB_FLOW_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in: | |
type: mysql | |
user: xxxx | |
password: xxxx | |
database: xxxx | |
host: xxxx | |
select: "*" | |
table: "test" | |
out: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#0 0x00007f703ffeb956 in ppoll () from /lib64/libc.so.6 | |
#1 0x00000000004f7d53 in rb_wait_for_single_fd (fd=<optimized out>, events=1, tv=<optimized out>) at thread.c:2862 | |
#2 0x0000000000428a41 in rb_io_wait_readable (f=19) at io.c:907 | |
#3 0x00007f70355be307 in ossl_start_ssl (self=140119728098360, func=0x7f70353891e0 <SSL_connect>, funcname=0x7f70355df60b "SSL_connect", nonblock=0) | |
at ossl_ssl.c:1146 | |
#4 0x00000000004e4edf in vm_call_cfunc (me=<optimized out>, blockptr=<optimized out>, recv=<optimized out>, num=<optimized out>, reg_cfp=<optimized out>, | |
th=<optimized out>) at vm_insnhelper.c:404 | |
#5 vm_call_method (th=0x7f702ed6d400, cfp=0x7f702d605818, num=0, blockptr=0x1, flag=0, id=20640, me=0x7f7035c11ae0, recv=140119728098360) at vm_insnhelper.c:530 | |
#6 0x00000000004e7ad0 in vm_exec_core (th=0x7f702ed6d400, initial=<optimized out>) at insns.def:1018 | |
#7 0x00000000004ec706 in vm_exec (th=0x7f702ed6d400) at vm.c:1236 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Audits your reserved instances vs your running instances, and reports back. | |
# If you want to run this from an AWS instance, its IAM Role must be granted at least the following: | |
# | |
#{ | |
# "Statement": [ | |
# { | |
# "Action": [ | |
# "ec2:DescribeInstances", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use IPC::Cmd qw/can_run run/; | |
our $OPENSSL = can_run('openssl') or die 'openssl is not installed!'; | |
my $ok = run( | |
verbose => 0, | |
command => [ | |
"openssl", "enc", | |
"-e", "-aes256", | |
"-in", $input, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opendir DH, $dir or die "Error: can't open $dir : $!"; | |
while (my $file = readdir DH) { | |
next if $file =~ /^\.{1,2}$/; | |
print $file, "\n"; | |
} | |
closedir DH; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use File::Temp; | |
use File::Copy; | |
my $origin_file = shift; |
OlderNewer