Skip to content

Instantly share code, notes, and snippets.

💭
¯\_(ツ)_/¯

Josh Spicer joshspicer

💭
¯\_(ツ)_/¯
Block or report user

Report or block joshspicer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joshspicer
joshspicer / running_average.py
Created Mar 25, 2020
Demonstrates calculating running average without maintaining a list of past values.
View running_average.py
#!/usr/bin/env python3
"""
Demonstrates calculating running average without maintaining a list of past values.
"""
nums = [55,2,591,5,31,73,7823,8,11,952,4,75,2,1000,1]
def classic_average():
avg = sum(nums) / len(nums)
View quick-bash-program.sh
#!/bin/bash
##################
NUM_ARGS=1
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
##################
View ios5.py
import requests
import threading
import logging
import sys
URL = "https://challenges.ncc.ninja/<ID>/"
headers = {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"X-Requested-With": "XMLHTTPRequest"}
logging.basicConfig(
View deploy-to-lambda.sh
#!/bin/bash
# Builds, zips, and uploads server code to AWS Lambda
# Place in root folder at SAME LEVEL as `/server`
# aws-cli must be configured. Will use default aws account.
ZIPNAME=<ANY NAME>
REGION=<YOUR REGION>
if [ "$#" -ne 1 ]; then
View destroyService.sh
#!/bin/bash
# Use with `launchService.sh`
if [ "$#" -ne 2 ]; then
echo "[-] Usage: ./removeIntance.sh <aws profile name> <identifier.txt>"
echo "Identifier must be in this directory. Include the .txt"
exit 1
fi
View launchService.sh
#!/bin/bash
# Written by Josh Spicer (Oct. 7, 2018)
# Creates a new EC2 instance based on a clean image taken previously.
# Prereqs:
# - aws-cli in user path
# - aws creds (aws configure --profile <profile name>) as first argument
# `jq` installed in user path
@joshspicer
joshspicer / changeMAC.sh
Created Oct 11, 2018
Change the MAC address for a given interface on your Mac computer.
View changeMAC.sh
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "[-] Usage: ./changeMAC.sh <interface>"
echo "[-] Hold down the option key and click the WiFi symbol to see your default interface name"
exit 1
fi
interface=$1
@joshspicer
joshspicer / SimpleHTTPServerWithUpload.py
Created Jun 13, 2018 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
View SimpleHTTPServerWithUpload.py
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
View keybase.md

Keybase proof

I hereby claim:

  • I am joshspicer on github.
  • I am joshspicer (https://keybase.io/joshspicer) on keybase.
  • I have a public key whose fingerprint is 415A 4243 34C5 C83A BE00 04CA D5C4 AC84 C321 1123

To claim this, I am signing this object:

You can’t perform that action at this time.