Skip to content

Instantly share code, notes, and snippets.

@heskyji
heskyji / ttfb.sh
Last active March 29, 2017 09:22 — forked from chrisiona/ttfb.sh
TTFB – Bash script that returns interesting information about a HTTP/S call
#!/bin/bash
# Returns interesting information about a HTTP/S call
# http://chrisiona.com/post/125309997618/ttfb-a-bash-script-that-returns-interesting
curl -so /dev/null \
-w "%{http_code}\tPre-Transfer: %{time_pretransfer}\tStart Transfer: %{time_starttransfer}\tTotal: %{time_total}\tSize: %{size_download}\n" \
$1
echo ""
@heskyji
heskyji / pecl-memcached.sh
Last active September 24, 2015 18:45 — forked from paul91/pecl-memcached.sh
How to install php memcached on CentOS 6.5
#!/bin/bash
# How to install PHP memcached on CentOS 6.5
# Install dependencies
yum install cyrus-sasl-devel zlib-devel gcc-c++
# Get the latest libmemcached
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
tar -xvf libmemcached-1.0.16.tar.gz
from boto.dynamodb2.exceptions import ValidationException
from boto.dynamodb2.fields import HashKey, RangeKey
from boto.dynamodb2.layer1 import DynamoDBConnection
from boto.dynamodb2.table import Table
from boto.exception import JSONResponseError
from time import sleep
import sys
if len(sys.argv) != 3:
print 'Usage: %s <source_table_name> <destination_table_name>' % sys.argv[0]
from boto.dynamodb2.exceptions import ValidationException
from boto.dynamodb2.fields import HashKey, RangeKey
from boto.dynamodb2.layer1 import DynamoDBConnection
from boto.dynamodb2.table import Table
from boto.exception import JSONResponseError
from time import sleep
import sys
if len(sys.argv) != 3:
print 'Usage: %s <source_table_name> <destination_table_name>' % sys.argv[0]
#!/usr/bin/env python
# Find the IAM username belonging to the TARGET_ACCESS_KEY
# Requirements:
#
# Environmental variables:
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
# python:
# boto