Skip to content

Instantly share code, notes, and snippets.

View zushane's full-sized avatar

Shane Doucette zushane

View GitHub Profile
@zushane
zushane / kapture.sh
Created November 17, 2016 19:47 — forked from nmarley/kapture.sh
OSX can capture WiFi packets using only tcpdump (and without needing a clunky interface such as KisMAC). Used for testing security strength of home WiFi setup.
#! /bin/bash
# This is for Mac OSX only.
# =============================================
# explanation of arguments used with 'tcpdump':
# =============================================
# -y IEEE802_11_RADIO => makes it capture __WIFI__ packets, turns resultant file
# into a dump which can be read by aircrack-ng, etc.
#
# -I => puts interface into monitor mode (required to capture packets)
@zushane
zushane / stress-runner.sh
Last active June 2, 2017 21:29
A simple script to run a pile of applications all at once to stress a Mac computer.
#!/bin/bash
while true; do
/usr/bin/open -F -a "/Applications/Firefox.app" 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
sleep 50
/usr/bin/open -a "/Applications/Firefox.app" 'https://google.ca'
sleep 5
/usr/bin/open -a "/Applications/Firefox.app" 'https://zu.com'
#!/bin/bash
# A bash script to create a time machine disk image suitable for
# backups with OS X 10.6 (Snow Leopard)
# This script probably only works for me, so try it at your own peril!
# Use, distribute, and modify as you see fit but leave this header intact.
# (R) sunkid - September 5, 2009
#
# This will create a time machine ready disk image named with your
# computer's name with a maximum size of 600GB and copy it to
# /Volumes/backup. The image "file" (it's a directory, really) will
@zushane
zushane / get-macos-serialnumber.sh
Created March 4, 2019 16:19
Use ioreg to print out a macOS serial number.
# From: https://apple.stackexchange.com/a/40244
ioreg -c IOPlatformExpertDevice -d 2 |awk '/IOPlatformSerialNumber/ {print $3}' |sed s/\"//g
@zushane
zushane / README.md
Created June 24, 2019 18:56 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
@zushane
zushane / convert-json-to-csv.py
Created June 30, 2020 20:49
A simple python script to convert json to csv, using Pandas.
import os,pandas
for file in os.listdir('./'):
if file.endswith('.json'):
print'Processing: ', os.path.join('./', file)
newfilename = str(file) + ".csv"
pandas.read_json(file).to_csv(newfilename, encoding = 'utf-8