Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports. If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443. An easy (and free) way to do this is via a Google free-tier micro instance. These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded. Set up one of these VMs via the Google Cloud console, and select CentOS 7 as the disk image. Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings. Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time. Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edi
- Go to https://script.google.com
- Create a New Project
- Replace the
Code.gs
file it creates for you with the javascript below (copy/paste) - Save the script
- Go to Triggers (looks like an alarm clock on left-hand side)
- Create a Trigger that acts every 10 minutes and calls
filterNGPVANSpam
- You'll need to authorize this script to act on your behalf, which may require that you use the scary "Advanced" section to allow the script to read/write to your email inbox.
This file contains 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
osascript <<END | |
tell application "System Events" | |
delay 0.5 | |
keystroke space using command down | |
delay 0.5 | |
set textBuffer to "TextEdit" | |
repeat with i from 1 to count characters of textBuffer | |
keystroke (character i of textBuffer) | |
delay 0.05 |
This file contains 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
user.userType=="EMPLOYEE" and (String.stringContains(user.title,"Software Engineer") or String.stringContains(user.title,"Software Developer") or String.stringContains(user.title,"Frontend Engineer") or String.stringContains(user.title,"Mobile Engineer") or String.stringContains(user.title,"Distinguished Engineer")) |
This file contains 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
import boto3 | |
# Initialize boto3 client | |
ec2 = boto3.client('ec2') | |
# CIDRs to check | |
EXISTING_CIDRS = ["1.2.3.4/32", "5.6.7.8/32"] | |
NEW_CIDR = '10.11.12.13/22' | |
# Create a paginator for the describe_security_groups method |
This file contains 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
from googleapiclient.discovery import build | |
from googleapiclient.errors import HttpError | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import Request | |
import os | |
import pickle | |
# If modifying these SCOPES, delete the file token.pickle. | |
SCOPES = ['https://www.googleapis.com/auth/drive'] |
This file contains 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 | |
bucket=$1 | |
set -e | |
echo "Removing all versions from $bucket" | |
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
This file contains 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
# This is some horrible stuff, but just quickly jotting stuff down to show it's possible to automate the nextdns API with LinkedIP setup, including profile creation | |
import requests | |
from nextdnsapi.api import account, settings | |
from shell import shell | |
from ifconfigparser import IfconfigParser | |
header = account.login("[email protected]", "some-pass-word") |
This file contains 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 | |
# ----------------------------------------------------------- | |
# Get installed OSX Network Devices and then list the ones with Active Internet Connections | |
# ----------------------------------------------------------- | |
InstalledHardware=$(networksetup -listallhardwareports | grep Device | awk '{print $2}') | |
ActiveInterfaces=$(ifconfig | pcregrep -M -o '^[^\t:]+(?=:([^\n]|\n\t)*status: active)') | |
# ----------------------------------------------------------- | |
# Get list of active network devices |
NewerOlder