Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
expbackoff() { | |
# Exponential backoff: retries a command upon failure, scaling up the delay between retries. | |
# Example: "expbackoff my_command --with --some --args --maybe" | |
local MAX_RETRIES=${EXPBACKOFF_MAX_RETRIES:-8} # Max number of retries | |
local BASE=${EXPBACKOFF_BASE:-1} # Base value for backoff calculation | |
local MAX=${EXPBACKOFF_MAX:-300} # Max value for backoff calculation | |
local FAILURES=0 | |
while ! "$@"; do | |
FAILURES=$(( $FAILURES + 1 )) | |
if (( $FAILURES > $MAX_RETRIES )); then |
curl -s -I -H "Pragma: akamai-x-cache-on" http://images.apple.com/ipad/images/product_title.png | grep X-Cache: |
#!/bin/bash | |
# | |
# rotate_desktop.sh | |
# | |
# Rotates modern Linux desktop screen and input devices to match. Handy for | |
# convertible notebooks. Call this script from panel launchers, keyboard | |
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.). | |
# | |
# Using transformation matrix bits taken from: | |
# https://wiki.ubuntu.com/X/InputCoordinateTransformation |
#!/bin/bash | |
# | |
# yoga-auto-rotate -- ghetto-style tablet mode, with keyboard and all. | |
# | |
# Simple little script that will detect an orientation change for a | |
# Lenovo Yoga 13 (very hackily) and adjust the active display's | |
# orientation and disable/enable the touchpad as necessary. | |
# | |
# The Yoga 13 will emit keycode `e03e` at one second intervals | |
# when the screen is flipped into tablet mode. Since this keycode |
Note 1: The following CQ curl commands assumes a admin:admin username and password. | |
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command. | |
Example: -F"":operation=delete"" | |
Note 3: Quotes around name of package (or name of zip file, or jar) should be included. | |
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
Install a bundle | |
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F |
#!/usr/bin/env ruby | |
progress = 'Progress [' | |
1000.times do |i| | |
# i is number from 0-999 | |
j = i + 1 | |
# add 1 percent every 10 times | |
if j % 10 == 0 |
#!/usr/bin/env python | |
# Public domain. | |
"""A script to establish an SSH SOCKS proxy and enable it in the OS X network configuration. | |
Cleanly handles failure to connect. Kills ssh and removes network configuration on CTRL-C. | |
First argument gives the hostname for use with ssh.""" | |
import subprocess, sys, signal | |
proxy_command_base = ['networksetup', '-setsocksfirewallproxystate', 'Wi-Fi'] |
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB | |
#/32 = 496630545 = 473MB | |
#/64 = 248315272 = 236MB | |
#/128 = 124157636 = 118MB | |
#/256 = 62078818 = 59MB | |
#/512 = 31039409 = 29MB | |
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762 | |
#/25165760 = 623 # half of max_connections = 1993.6MB | |
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608 | |
#*(3/4) #default innodb pool size = 11922309120 |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |