This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<!-- Home: Manual --> | |
<dict> | |
<key>UserDefinedName</key> |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'csv' | |
require 'bigdecimal' | |
require 'prawn' # gem install prawn | |
require 'prawn/measurement_extensions' | |
require 'prawn/table' # gem install prawn-table | |
raise "No CSV file given" if ARGV[0].nil? |
This file contains hidden or 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 | |
if [ $# -lt 1 ]; then | |
echo "Syntax: $0 (on|off)" | |
exit | |
fi | |
if [ $1 == "on" ]; then | |
tvservice -p | |
sleep 2 |
This file contains hidden or 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
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.region=="eu-west-1" or .region == "eu-central-1" or .region == "GLOBAL") | .ip_prefix' | sort -u | sort -n |
This file contains hidden or 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 | |
require 'openssl' | |
require 'socket' | |
require 'uri' | |
CA_BUNDLE_URL='https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt' | |
#CA_BUNDLE_URL='https://raw.githubusercontent.com/bagder/ca-bundle/e9175fec5d0c4d42de24ed6d84a06d504d5e5a09/ca-bundle.crt' | |
puts "Downloading ca-bundle.crt from github to local file" |
This file contains hidden or 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
Check out the newer version of this gist at: | |
https://gist.github.com/thomaswitt/2f847199863a103dfcf004fec3c538d0 | |
and the corresponding blog post: | |
https://thomas-witt.com/auto-connect-your-ios-device-to-a-vpn-when-joining-an-unknown-wifi-d1df8100c4ba |
This file contains hidden or 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
# upload-cert www_myserver_com.crt aws_profile_name SSL123_SecondaryCA.crt SSL123_PrimaryCA.crt | |
function upload-cert() { | |
NAME=`echo "$1" | cut -d'.' -f1` | |
END=`openssl x509 -in $NAME.crt -noout -enddate | cut -f2 -d= | while read x; do date -j -f '%b %d %T %Y %Z' "$x" '+%Y-%m-%d'; done` | |
cat $3 $4 $5 >certchain.pem | |
aws --profile $2 iam upload-server-certificate --server-certificate-name ${NAME}-${END} \ | |
--certificate-body file://$NAME.crt --private-key file://$NAME.key.rsa --certificate-chain file://certchain.pem | |
} |
This file contains hidden or 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
require 'aws-sdk' | |
AWS.config({ | |
access_key_id: ENV['AWSAccessKeyId'].strip, | |
secret_access_key: ENV['AWSSecretKey'].strip, | |
region: 'eu-west-1', | |
use_ssl: true, | |
}) | |
r53 = AWS::Route53.new |
This file contains hidden or 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
require 'mechanize' | |
m = Mechanize.new | |
users = [] | |
rooms = [] | |
login = m.get('https://secure.live.sipgate.de/settings/setup') | |
login.form do |f| | |
f.username = '[email protected]' | |
f.password = 'secret_password' |
This file contains hidden or 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
wget -q -O - \ | |
https://www.pingdom.com/rss/probe_servers.xml | \ | |
perl -nle 'print $1 if /IP: (([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]));/' | \ | |
sort -n -t . -k1,1 -k2,2 -k3,3 -k4,4 |