Skip to content

Instantly share code, notes, and snippets.

View ollytheninja's full-sized avatar

Olly E ollytheninja

View GitHub Profile
@ollytheninja
ollytheninja / Antimony.css
Last active April 30, 2024 17:30 — forked from lukereative/Antimony.css
Markdown css Just add <link href="style.css" rel="stylesheet"></link> to the start of your markdown document.
* { margin: 0; padding: 0; }
abbr,acronym,blockquote,code,dir,kbd,listing,plaintext,q,samp,tt,var,xmp { hyphens: none; }
html {
padding: 2em;
font: normal 18px/1.25 Source Sans Pro, sans-serif;
color: #000;
hyphens: auto;
@ollytheninja
ollytheninja / .bash_profile
Last active January 3, 2016 18:09
My config files
# 11/11/13
# ~/.bash_profile
#
# If TTY1 startx otherwise start bash
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -z $DISPLAY && XDG_VTNR -eq 1 ]] && exec startx
@ollytheninja
ollytheninja / scapy_wireshark_poc.py
Created October 4, 2015 10:26
Dead simple PoC of how scapy could be used to build a replacement Wireshark without C
#!/usr/bin/env python2
try:
import scapy.all as scapy
except ImportError:
import scapy
if __name__ == "__main__":
from argparse import ArgumentParser
parser = ArgumentParser(
https://facebook.com/v2.9/dialog/oauth?client_id=270998186616745&display=popup&response_type=code&scope=user_posts&redirect_uri=https%3A%2F%2Fkeybase.io%2F_%2Ffacebook_login_redirect%3Fsig_id_med%3DWO3rxSCdRYrTc87DG-Av1OkiN9x6GfizUdoEmgrmBlk%26keybase_token%3DlgHZIDdiYTA5YWU2NDY2MzFiNDIzZDk4ODYzM2E1MjQ4ZTE5zloTZ3fOAAP0gMDEIBOwk3PAzcBsTBbSQtfjyQTnnOE4dVoS1BtCT7byaAdA
@ollytheninja
ollytheninja / card_pair.py
Last active December 29, 2018 03:00
Pairs RFID cards with their barcodes
import os
output_file = "card_pairs.csv"
magic_number = 6
if output_file not in os.listdir('.'):
with open(output_file, "w") as f:
f.write("id_number,card_serial\n")
def do_the_thing():
@ollytheninja
ollytheninja / locustfile.py
Created February 13, 2019 22:55 — forked from yamionp/locustfile.py
Websocket Locust Sample. locustfile and Echo/Chat Server
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import json
import uuid
import time
import gevent
@ollytheninja
ollytheninja / keybase.md
Last active May 1, 2022 22:20
keybase.md

Keybase proof

I hereby claim:

  • I am ollytheninja on github.
  • I am oliverewert (https://keybase.io/oliverewert) on keybase.
  • I have a public key ASCpu8NNJTOI8ZsBp5Wa7cUFtBPZwN9HEBf9Kq6P0aB_8Qo

To claim this, I am signing this object:

@ollytheninja
ollytheninja / install_aws2.sh
Created December 1, 2019 22:42
Install the preview version of AWS CLI V2 from source
mkvirtualenv aws2
workon aws2
pip install -e git://github.com/boto/botocore.git@v2#egg=botocore
pip install -e git://github.com/aws/aws-cli.git@v2#egg=awscli
alias aws2='python -m awscli'
@ollytheninja
ollytheninja / pair.py
Created December 2, 2019 04:16
silly little script for pairing things together in a CSV, used to pair a barcode and RFID card serial together
import os
output_file = "card_pairs.csv"
magic_number = 4
if output_file not in os.listdir('.'):
with open(output_file, "w") as f:
f.write("id_number,card_serial\n")
while 1:
# iptables dance, probably needs reviewing
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i eth0 -j ACCEPT
iptables -P INPUT DROP
iptables -A FORWARD -i wlan0 -o wlan0 -j REJECT
# Show ip tables
iptables -L -v -n
iptables -S