Skip to content

Instantly share code, notes, and snippets.

View scottk212's full-sized avatar

Scott Kupferschmidt scottk212

View GitHub Profile
UNAME="$(uname)"
WHOAMI="$(id -u)"
function pidport() {
local colourify='/usr/local/bin/grc -es --colour=auto'
if [ -z "${1}" ];
then
echo "usage: $FUNCNAME port <protocol (tcp/udp default: any)>"
@scottk212
scottk212 / multi-az_with_nat_gateways.template
Created January 31, 2019 06:27 — forked from coingraham/New_VPC.yaml
multiaz-vpc with redundant nat gateways.
{
"AWSTemplateFormatVersion":"2010-09-09",
"Description":"Multi-AZ VPC (2 public and 2 private subnets) with redundant Gateway NATs",
"Parameters":{
"NamePrefix":{
"Description":"A string that will be prepended to stack resource names",
"Type":"String",
"Default":"CHANGEME"
},
"VpcCidr":{
@scottk212
scottk212 / snakecoin-server-full-code.py
Created November 3, 2018 23:07 — forked from aunyks/snakecoin-server-full-code.py
The code in this gist isn't as succinct as I'd like it to be. Please bare with me and ask plenty of questions that you may have about it.
from flask import Flask
from flask import request
import json
import requests
import hashlib as hasher
import datetime as date
node = Flask(__name__)
# Define what a Snakecoin block is
class Block:
@scottk212
scottk212 / redis-migrate.sh
Created November 3, 2018 19:46 — forked from nicStuff/redis-migrate.sh
Comfort tool for migrating redis keys among instances. Supports KEYS syntax matching, authentication and TTL
#!/bin/bash
######
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
# TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
######
@scottk212
scottk212 / Bootstraping_webplatform_network.md
Created October 8, 2018 23:40 — forked from WebPlatformDocs/Bootstraping_webplatform_network.md
Bootstrapping a network Salt master based on a few git repositories
@scottk212
scottk212 / keybase.md
Created January 15, 2018 17:27
keybase prove

Keybase proof

I hereby claim:

  • I am scottk212 on github.
  • I am scottk212 (https://keybase.io/scottk212) on keybase.
  • I have a public key ASDaled25OBD07nY1rwCPjUikAHn8wkvXaeD750ycQOuSQo

To claim this, I am signing this object:

@scottk212
scottk212 / tokudb_copy.sh
Created September 6, 2017 08:44 — forked from shantanuo/tokudb_copy.sh
Copy toku database to another server without using dump
#!/bin/sh
# copy the database source files to destination
dbname='palus'
source='/DATA/4GLV/tokudb/'
destip='192.168.150.137'
destuser='db'
destpass='db'
destport='3306'
@scottk212
scottk212 / oathtool totp google 2 factor example.txt
Created August 31, 2017 08:42 — forked from NapoleonWils0n/oathtool totp google 2 factor example.txt
macosx: oathtool totp google 2 factor authentication
#-----------------------------------------------#
# oathtool totp google 2 factor
#-----------------------------------------------#
# if you have already set up 2 factor authentication with your phone
# you need to remove it from your phone and google authenticator app
# this wont invalidate your backup codes or application codes
# login to your google account go to 2 factor authentication,
@scottk212
scottk212 / README.md
Created June 26, 2017 02:40 — forked from steve-jansen/README.md
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@scottk212
scottk212 / README.md
Created June 26, 2017 02:40 — forked from steve-jansen/README.md
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep