Skip to content

Instantly share code, notes, and snippets.

🏴
.

Jason M. json-m

🏴
.
Block or report user

Report or block json-m

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
View videojs-plugin-events-logger.js
// The events are from https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary
import videojs from 'video.js'
const Plugin = videojs.getPlugin('plugin')
const EVENTS = [
'loadstart',
'progress',
'suspend',
'abort',
'error',
@json-m
json-m / spaceislit.py
Created Dec 13, 2018
top 5 posts for /r/space
View spaceislit.py
import requests
import json
count = 0
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36'
}
r = requests.get('https://www.reddit.com/r/space/top.json', headers=headers)
posts = json.loads(r.text)
@json-m
json-m / rain.py
Last active Dec 13, 2018
not for evil
View rain.py
import requests
import time
url = "https://zj.is/"
method = "HEAD"
def rain(arg):
try:
now = time.time()
r = requests.request(method=method, url=arg)
print(now, method, arg)
time.sleep(0.016) # about 20~25rq/s
@json-m
json-m / wvw_forwarder.py
Last active May 29, 2018
forwards guild wars 2 wvw stats to graphite
View wvw_forwarder.py
import requests
from requests import exceptions
import json
import time
import graphyte
# setup:
# pip3 install requests graphyte
match_url = 'https://api.guildwars2.com/v2/wvw/matches'
matches_dict = {}
graphyte.init('localhost', prefix='gw2.wvw') # change to your server
View sqlite3test.py
import sqlite3
from pathlib import Path
dbpath = Path('test.db')
def insert(uid, name):
print('inserting')
print(' ↪ uid:', uid)
print(' ↪ name:', name)
c.execute('INSERT INTO test (uid, name) values (?, ?)', (uid, name))
@json-m
json-m / gist:8debe415f5ee721a378fc1c1c3d0730d
Created Jan 27, 2018
alexa top 5000 @ fastly // 27-1-2018
View gist:8debe415f5ee721a378fc1c1c3d0730d
6,reddit.com
46,imgur.com
51,wikia.com
73,stackoverflow.com
77,pinterest.com
104,bbc.co.uk
106,bbc.com
109,cnn.com
112,nytimes.com
133,vimeo.com
@json-m
json-m / docker-compose.yml
Created Dec 23, 2017
powerdns compose file
View docker-compose.yml
pdns:
image: secns/pdns
links:
- "pdnsdb:db"
ports:
- "53:53"
- "53:53/udp"
dns: 9.9.9.9
environment:
- PDNS_ALLOW_AXFR_IPS=127.0.0.1
@json-m
json-m / cidr.txt
Created Dec 11, 2017
cidr & net. info cheat sheet
View cidr.txt
Netmask Netmask (binary) CIDR Notes
_____________________________________________________________________________
255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr)
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 useable
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 useable
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 useable
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 useable
@json-m
json-m / hify.pl
Last active Dec 11, 2017
annoy everyone with ocd on irc
View hify.pl
use warnings;
use strict;
use IPC::Open3;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = '0.1';
%IRSSI = (
author => 'c|p',
name => 'h-ify',
View hardening_usbarmory.md

Hardening the USB Armory

As a good crypto nerd, I usually use an entirely encrypted linux FS: / but also /boot using grub LUKS support. It's a good setup but it's not perfect, the BIOS and the bootloader are not protected.

I recently got a USBArmory and I wanted to apply the same (or a better) setup.

I found some useful links but no clear howto. So this is my setup.

You can’t perform that action at this time.