Annoying message?
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
#!/usr/bin/env python | |
import hashlib | |
import optparse | |
import paramiko | |
from Crypto.PublicKey import RSA | |
def insert_char_every_n_chars(string, char='\n', every=64): | |
return char.join( |
# Automated AMI Backups | |
# | |
# @author Robert Kozora <bobby@kozora.me> | |
# | |
# This script will search for all instances having a tag with "Backup" or "backup" | |
# on it. As soon as we have the instances list, we loop through each instance | |
# and create an AMI of it. Also, it will look for a "Retention" tag key which | |
# will be used as a retention policy number in days. If there is no tag with | |
# that name, it will use a 7 days default value for each AMI. | |
# |
""" | |
Suspend an auto scaling group's scaling processes that can interfere with CodeDeploy deploys. | |
It assumes a single ASG per deployment group. | |
To use this: | |
* create a lambda function with this code, then hook up it up to an SNS topic that receives all deployment events (but not host events). | |
* attach that topic as a trigger in your deployment groups. | |
Unlike AWS's in-appspec approach, this supports arbitrary deploy concurrency. |
#!/bin/bash | |
# mk-eph.sh | |
# Creates a lvm volume over all ephemeral devices. | |
# Swap related operations | |
function SwapEnabler() { | |
local swapdev='/dev/ephemeral/swap' | |
local swapon="$(swapon -s | wc -l)" | |
# See if some swap is enabled already. |
var table = document.getElementsByClassName('advanced_dns')[0]; | |
var rows = table.getElementsByTagName('tr'); | |
var i, len, row; | |
var hostname, type, priority, ttl, destination; | |
var output = ''; | |
output += '$TTL 600\n'; // start with default TTL | |
// skip header and last two rows (add new entry, delete all entries) | |
for (i = 1, len = rows.length - 2; i < len; i++) { |
write-host "`n ## NODEJS INSTALLER ## `n" | |
### CONFIGURATION | |
# nodejs | |
$version = "4.4.7-x64" | |
$url = "https://nodejs.org/dist/latest-v4.x/node-v$version.msi" | |
# git | |
$git_version = "2.9.2" |
Data Size: | |
Input: 2074 | |
LZ4: 758 (0.37) | |
Snappy: 676 (0.33) | |
LZF: 697 (0.34) | |
ZLIB: 510 (0.25) | |
LZ4 / Snappy: 1.121302 | |
LZ4 / LZF: 1.087518 | |
LZ4 / ZLIB: 1.486275 | |
Benchmark: 50000 calls |
# Alternative (improved?) implementation of Measure-Command | |
# Works similarly to the Linux/Unix `time` command | |
# | |
# Function which times how long a command takes to completion | |
# Note that this function outputs to Write-Host so as to | |
# protect the proper return value. Note that a time will be | |
# returned even if the command fails. | |
# | |
# Unless `-quiet` is specified, command output is sent directly | |
# to `Write-Host` to allow for the simultaneous return of the |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2470157/hack.sh | sh | |
# |