Useing OpenSSL to generate RSA keys for client-server applications
Set up directories
mkdir -p ca client server
from __future__ import print_function | |
import argparse | |
import boto3 | |
def copy_table(source, target): | |
dynamodb = boto3.resource("dynamodb") | |
source_table = dynamodb.Table(source) | |
target_table = dynamodb.Table(target) |
#!/bin/bash | |
# reconfigure AWS CLI credentials | |
set -e | |
function requires() { | |
if ! command -v $1 &>/dev/null; then | |
echo "Requires $1" | |
exit 1 | |
fi |
#!/bin/bash | |
# Declare requirements in bash scripts | |
set -e | |
function requires() { | |
if ! command -v $1 &>/dev/null; then | |
echo "Requires $1" | |
exit 1 | |
fi |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Requires the vagrant-vbguest plugin | |
# vagrant plugin install vagrant-vbguest | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/7" | |
# sets up the parent directory as the synced folder, so you can place the Vagrantfile in a sub-dir in your workspace |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "AWS CloudFormation deploys a Windows machine used for Steam", | |
"Parameters": { | |
"AWSAMI": { | |
"Description": "Choose the AMI ID for your Steam machine. This should be a Windows Server 2012 R2 instance and the ID will look like ami-XXXXXXXX", | |
"Type": "AWS::EC2::Image::Id" | |
}, | |
"AWSSubnet": { | |
"Description": "Choose a subnet for the Steam instance.", |
mkdir -p ca client server
#!/bin/bash | |
# Profile for Mac OS X systems | |
# Proxy setup ---------------------------------------------------------- | |
export PROXY_HOST=www-proxy.example.com | |
export PROXY_PORT=80 | |
function proxy_reset() { | |
if [ "$1" = "MyCompany On Network" ]; then |
cd repository | |
git log --pretty=email --patch-with-stat --reverse --full-index --binary -- path/to/file_or_folder > patch | |
cd ../another_repository | |
git am < ../repository/patch |
#!/usr/bin/env python | |
import sys | |
def rgb2Yiq(red, green, blue): | |
y = int((0.299 * red) + (0.587 * green) + (0.114 * blue)) | |
i = int((0.596 * red) - (0.275 * green) - (0.321 * blue)) | |
q = int((0.212 * red) - (0.528 * green) + (0.311 * blue)) | |
return (y, i, q) |
#!/usr/local/bin/env python | |
import signal | |
import sys | |
packet_size = 188 | |
position = 0 | |
paused = False | |
def pause_handler(signal, frame): |