Skip to content

Instantly share code, notes, and snippets.

View Tantas's full-sized avatar

Joseph Preiss Tantas

  • Toronto Area, Ontario, Canada
View GitHub Profile
@Tantas
Tantas / acanac_speed_test.sh
Last active August 29, 2015 14:04
Performs the identical speed test to the speed test widget found at http://www.acanac.ca/speedtest/.
#!/bin/bash
#===============================================================================
# FILE: acanac_speed_test.sh
#
# USAGE: acanac_speed_test.sh (-c)
#
# DESCRIPTION: Performs the identical speed test to the speed test widget found
# at http://www.acanac.ca/speedtest/.
#
# OPTIONS: -c changes the output to be 'epoch-timestamp, down, up'
@Tantas
Tantas / example_output.csv
Last active August 29, 2015 14:05
Outputs all values of a MT130U Cable Modem accessible over the LAN and echos the values in csv format for later analysis.
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 122 columns, instead of 10 in line 1.
1407462650,Channel,Lock Status,Modulation,Channel ID,Frequency,Power,SNR,Correctables,Uncorrectables,1,Locked,QAM256,12,663000000 Hz,-2.1 dBmV,37.9 dB,22134,1752,2,Locked,QAM256,5,615000000 Hz,-3.2 dBmV,37.8 dB,33552,8041,3,Locked,QAM256,6,621000000 Hz,-2.8 dBmV,38.1 dB,25109,3336,4,Locked,QAM256,7,633000000 Hz,-2.0 dBmV,38.2 dB,33830,7143,5,Locked,QAM256,8,639000000 Hz,-2.0 dBmV,38.2 dB,28282,4197,6,Locked,QAM256,9,645000000 Hz,-2.1 dBmV,38.2 dB,25817,2750,7,Locked,QAM256,10,651000000 Hz,-1.9 dBmV,37.9 dB,635115,54101,8,Locked,QAM256,11,657000000 Hz,-1.5 dBmV,38.2 dB,425238,23390,Total Correctables,Total Uncorrectables,1229077,104710,Channel,Lock Status,US Channel Type,Channel ID,Symbol Rate,Frequency,Power,1,Locked,ATDMA,6,5120 Ksym/sec,30596000 Hz,42.2 dBmV,2,Locked,TDMA and ATDMA,5,2560 Ksym/sec,38596000 Hz,42.2 dBmV,3,Locked,ATDMA,7,5120 Ksym/sec,23700000 Hz,42.2 dBmV,4,Not Locked,Unknown,0,0 Ksym/sec,0 Hz, 0.0 dBmV,
1407462775,Channel,Lock Status,Modulation,Channel ID,Frequency,Power,SNR,Correctables,Un
@Tantas
Tantas / archlinux_setup_environment.sh
Created August 7, 2014 21:35
Setup a comfortable working environment on ArchLinux.
# If ArchLinux Rasberry Pi, SSH into the machine with root/root
ssh root@<ip-address>
# Apply updates
pacman -Syu
# Create a user to work under
useradd -m -G wheel -s /bin/bash joe
passwd joe
@Tantas
Tantas / l2tp_ipsec_setup_arch_linux_raspberry_pi.sh
Last active December 14, 2019 01:38
Guide to install L2TP-IPSEC VPN Server on a Raspberry Pi with ArchLinux
#!/bin/bash
# Guide to install L2TP-IPSEC VPN Server on a Raspberry Pi with ArchLinux
# Used parts of several instructions,
# http://nls.io/setup-an-ipsec-l2tp-vpn-with-text-or-ldap-auth-on-arch-linux/
# https://smileykeith.com/2014/01/27/ipsec-l2tp-vpn-on-a-raspberry-pi-running-arch-linux/
# http://linux.tips/tutorials/how-to-setup-l2tp-vpn-server-on-raspberry-pi
# Tested and works with OSX and iOS 7.1 supplied vpn client
@Tantas
Tantas / amazon-ami-environment-setup.sh
Last active September 26, 2016 15:38
Amazon Linux AMI comfortable environment setup
#!/bin/bash
# Amazon Linux AMI Environment Setup
#===============================================================================
# Connect to the server
#===============================================================================
# Correct the permissions on the SSH RSA key
chmod 600 ./punoff_prod.pem
@Tantas
Tantas / gitolite_setup_amazon_ami.sh
Created August 8, 2014 19:06
Install gitolite to an Amazon AMI server
#!/bin/bash
# Install gitolite to an Amazon AMI server
# Allows a low-spec ec2 machine to be used
#===============================================================================
# Install gitolite
#===============================================================================
# Create the git user
@Tantas
Tantas / gitolite_migrate_repo.sh
Created August 8, 2014 20:48
Migrates a local git repository to the gitolite server
#!/bin/bash
# Migrates from a local git project and places onto the gitolite server.
# Reference http://gitolite.com/gitolite/g2/moverepos.html
# Usage: Execute from the git directory to migrate
# ex. ~/Developer/gitolite/migrate_repo.sh new-repo-name
# Get the current working directory
EXISTING_REPO_DIRECTORY=$(pwd)
@Tantas
Tantas / github_public_repository_list.py
Created August 17, 2014 19:47
Get public repository list from GitHub.
#!/usr/bin/env python
"""
Get public repository list from github. Must modify the user name in the script.
"""
import json
import urllib2
# Determine the github api call for the repository list
@Tantas
Tantas / clone_gitolite_repo.sh
Created August 18, 2014 19:31
List and clone gitolite repos using ssh keys
#!/bin/sh
# List and clone gitolite repos using ssh keys
# Note: 'privategit' is a host found in ~/.ssh/config
# List the available repositories if no argument
if [[ "$#" -ne 1 ]]; then
echo "Provide the name of the project to clone"
echo "Available projects are:"
ssh privategit info 2>/dev/null | tail -n +3 | awk '{ print $3 }'
@Tantas
Tantas / list_git_remotes_in_folder.sh
Created August 18, 2014 19:33
List the repository remotes found in a supplied directory
#!/bin/sh
# List the repository remotes found in a supplied directory.
# List the available repositories if no argument
if [[ "$#" -ne 1 ]]; then
echo "Provide a directory containing repositories."
exit -1
fi