HP BL460
- 48 Gb Memory
- 2 x X5675 @ 3.07GHz
- 2 x 10 gbps NIC
- 2tb NetApp NFS volume for ES data
#!/bin/bash | |
#this will mirror a website, upload to s3, and make it publically available. | |
#install s3cmd. install wget. (i use homebrew). | |
#configure s3cmd (s3cmd --configure) | |
# run this by doing: mirror_site.sh www.example.org | |
wget --mirror -p --html-extension --convert-links -e robots=off -P . $1 | |
s3cmd mb s3://$1 |
#!/bin/bash | |
# | |
# Jenkins Swarm Client | |
# | |
# chkconfig: 2345 89 9 | |
# description: jenkins-swarm-client | |
source /etc/rc.d/init.d/functions |
We run a lot of project in our automated test environment and they spend a lot of time doing npm install
.
One way to speed up npm install
and hammer the registry a little less is to use the http-version of the registry and to pass the requests through a proxy.
However, the npm requests include an authorization
-header and the responses come with an ETag
and Cache-Control: max-age=60
, so with default squid settings there is a lot of roundtrips to registry.npmjs.org that result in 304's.
This is what the requests look like once npm has cached the first set of responses:
GET http://registry.npmjs.org/sntp HTTP/1.1
# This script adds aws route53 health check IPs to security group | |
# Requires jq to be installed (https://github.com/stedolan/jq) | |
# Pass security group ID as first argument and port (range) as a second | |
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | | |
jq '.prefixes[] | select(.service == "ROUTE53_HEALTHCHECKS") | .ip_prefix' | | |
xargs -t -n1 aws ec2 authorize-security-group-ingress --group-id "$1" --protocol tcp --port "$2" --cidr |
#!/bin/bash | |
# | |
# Author: SuperPaintman <[email protected]> | |
# | |
### | |
# Constants | |
### | |
RETVAL=0 |
ps -ef | awk -e '/qemu/ && !/awk/' | sed -e 's/[^/]*//' -e 's/ -/\n\t-/g' |
# Took this: | |
# https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth_adfs3.py | |
# converted to boto3 and smooshed it together with this: | |
# https://gist.github.com/kapilt/ac8e222081f63ba64e93 | |
# which gave birth too this: | |
import sys | |
import botocore | |
import boto3 | |
import requests |
-- Upgrading old partitioning with ALTER TABLEs and PLPGSQL. | |
-- IN: _orig_table - master table which should be upgraded | |
-- IN: _partkey - column which used as partition key | |
-- IN: _seq_col - sequence column | |
CREATE OR REPLACE FUNCTION fn_upgrade_partitioning(_orig_table text, _partkey text, _seq_col text) RETURNS void AS | |
$function$ | |
DECLARE | |
_new_table text = _orig_table ||'_new'; -- parent relation's name | |
_child_table text; -- child relation's name | |
_v_from timestamp without time zone; |