Skip to content

Instantly share code, notes, and snippets.

View json-m's full-sized avatar
🏴

Jason M. json-m

🏴
View GitHub Profile
@json-m
json-m / statics.js
Created April 8, 2015 03:13
eveeye.com static connection scraper
#!/bin/env node
// eveeye static connection scraper
// npm install underscore string request limiter
var _ = require('underscore')
fs = require('fs')
str = require('string')
request = require('request')
RateLimiter = require('limiter').RateLimiter
@json-m
json-m / Dockerfile
Created February 5, 2016 03:14
centos:7 working systemd
# modified from some redhat page
# to run: --privileged -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro
FROM centos:7
MAINTAINER "jason" <me@jason.lv>
ENV container docker
RUN yum -y update; \
yum clean all; \
yum -y install systemd; \
yum clean all; \
yum install openssh-server -y; \
@json-m
json-m / hardening_usbarmory.md
Last active February 1, 2018 03:50 — forked from yann2192/hardening_usbarmory.md
Hardening USB Armory

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.

@json-m
json-m / hify.pl
Last active December 11, 2017 20:27
annoy everyone with ocd on irc
use warnings;
use strict;
use IPC::Open3;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = '0.1';
%IRSSI = (
author => 'c|p',
name => 'h-ify',
@json-m
json-m / cidr.txt
Created December 11, 2017 20:17
cidr & net. info cheat sheet
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 / docker-compose.yml
Created December 23, 2017 02:23
powerdns compose file
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 / gist:8debe415f5ee721a378fc1c1c3d0730d
Created January 27, 2018 23:42
alexa top 5000 @ fastly // 27-1-2018
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 / sqlite3test.py
Created May 26, 2018 23:05
sqlite3 example
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 / wvw_forwarder.py
Last active May 29, 2018 13:55
forwards guild wars 2 wvw stats to graphite
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
@json-m
json-m / rain.py
Last active December 13, 2018 20:41
not for evil
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