Skip to content

Instantly share code, notes, and snippets.

View zackramjan's full-sized avatar

Zack Ramjan zackramjan

  • Grand Rapids, MI
View GitHub Profile
@zackramjan
zackramjan / Auto Check-In to Southwest Flights.user.js
Last active December 28, 2019 07:22 — forked from stormchasing/Auto Check-In to Southwest Flights.user.js
Auto Check-In to Southwest Flights.user.js
// ==UserScript==
// @name Auto Check-In to Southwest Flights
// @namespace http://www.ryanizzo.com/southwest-auto-check-in/
// @version 1.8
// @author Nicholas Buroojy (http://userscripts.org/users/83813)
// @contributor Ryan Izzo (http://www.ryanizzo.com)
// @contributor JR Hehnly (http://www.okstorms.com @stormchasing)
// @contributor Trevor McClellan (github.com/trevormcclellan)
// @description Automatically check in to Southwest Airline flights at the appropriate time.
// @include https://www.southwest.com/air/check-in/index.html*
@zackramjan
zackramjan / network_test.sh
Last active April 21, 2020 15:22 — forked from popmonkey/network_test.sh
EdgeOS ready script that tests for WAN connection degradation (via packet loss and latency checks)
#!/bin/sh
#
# USG and EdgeRouter route-test script for failover
#
# uses ping to check latency and packet loss.
# returns zero when within thresholds and non zero (1) when above thresholds
# uses ping, traceroute, and logger
#
# by https://github.com/popmonkey
#
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
balanceA=${1:-100}
balanceB="$((100-$balanceA))"
configure
set load-balance group G interface eth0 weight $balanceA
set load-balance group G interface eth1 weight $balanceB
commit
exit
#!/bin/bash
#PREFIX=awsgpfs
PREFIX=awsgpfs
echo creating account
mmcloudgateway account create --cloud-nodeclass tctnodeclass --account-name ${PREFIX} --cloud-type S3 --username AKIAZJ357KC6UJ6Y3RQK --pwd-file /tmp/cloudPW
mmcloudgateway account list
echo ----------------------------------------------
#!/bin/bash
#PREFIX=awsgpfs
PREFIX=awsgpfs4
echo deleting container pairset
mmcloudgateway containerpairset delete --cloud-nodeclass tctnodeclass --container-pair-set-name ${PREFIX}container
mmcloudgateway containerpairset list
echo -------------------------------------------
./spectrumscale node add nsda -a -n -m -q -g
./spectrumscale nsd add /dev/xvdb /dev/xvdc /dev/xvdd -p nsda -po pool1 -fg 1 -fs primary
./spectrumscale setup -s 172.31.19.233
./spectrumscale nsd add /dev/xvdc -p nsda -po pool1 -fg 1 -fs primary
./spectrumscale nsd add /dev/xvdd -p nsda -po pool1 -fg 1 -fs primary
./spectrumscale node add nsdb -a -n -m -q -g
./spectrumscale nsd add /dev/xvdb /dev/xvdc /dev/xvdd -p nsdb -po pool1 -fg 2 -fs primary
@zackramjan
zackramjan / compare_ssl.sh
Last active January 3, 2021 20:53
This will compare an openssl certificate from a server to the one stored in cacerts in the local java keystore. If they differ you have have an issue
echo Q | openssl s_client -showcerts -connect vaidc02.vai.org:636 | openssl x509 -fingerprint -noout -in /dev/stdin |grep SHA1 ; keytool -list -v -storepass changeit -keystore /etc/pki/ca-trust/extracted/java/cacerts -alias vaidc02 |grep SHA1
@zackramjan
zackramjan / stopMacCiscoServices
Created March 28, 2021 01:23
This will disable and stop all mac cisco services such as Ice Anyconnect etc
#!/bin/bash
FILES=/Library/LaunchAgents/com.cisco*
launchctl list |grep cisco
for f in $FILES
do
echo launchctl unload -w $f
launchctl unload -w $f
sudo launchctl unload -w $f
done
@zackramjan
zackramjan / file_stat_report.pl
Created April 22, 2021 02:55
report on file stats from list on stdin
#!/usr/bin/perl
use POSIX qw(strftime);
use strict;
while(<>)
{
chomp;
$_ =~ s/\\/\//g;
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat("/varidata/research/$_");
print "/varidata/research/$_\t$uid\t" . strftime("%m/%d/%Y %H:%M:%S",localtime($atime)) . "\t". strftime("%m/%d/%Y %H:%M:%S",localtime($mtime)) . "\t$size\n";

Docker Macvlan and Ipvlan Experimental Driver Examples

  • The build will be vendored into github.com/docker/docker in the next few days. In the meantime here is the binary that will be getting vendored. docker-1.11.0-dev.zip
  • Ipvlan L2 mode network with multiple subnets without a parent specified
  • For a long test that will create 54 networks and 120+ containers, then delete them all and recreate them again try ipvlan-macvlan-it.sh Instructions here Docker Macvlan and Ipvlan Manual IT Test
  • FYI Note: When the parent is empty or the --internal flag is used, a linux type dummy interface is dynamically created by Libnetwork to act as the parent. This network is completely isolated and is the equivalent to a --internal flag. This is a good mode for demoing.
  • The first test requires an interface