Skip to content

Instantly share code, notes, and snippets.

View jgillmanjr's full-sized avatar

Jason Gillman Jr. jgillmanjr

View GitHub Profile
@jgillmanjr
jgillmanjr / exceptionTest.py
Last active August 29, 2015 14:07
Requests Exception Test
from snakeStorm import snakeStorm
con = snakeStorm('validuser', 'validpass', 'storm/server/list', version = 'bleed')
con.changeBase('https://test-api-server.example.com', 20900)
print con.request()
@jgillmanjr
jgillmanjr / parse.py
Last active August 29, 2015 14:09
Comment Scraper
import facebook
import json
import iso8601
import pytz
tZone = pytz.timezone('US/Eastern')
token = raw_input('User Token: ')
threadID = raw_input('Thread ID: ')
@jgillmanjr
jgillmanjr / __init__.py
Created December 15, 2014 21:44
Overload errors
"""
A layer to provide for dataconsistency utilizing a schema
Author: Jason Gillman Jr.
"""
import py2neo
import json
def validateSchema(schema):
@jgillmanjr
jgillmanjr / test.py
Created December 19, 2014 21:59
pySchema4neo test script
#!/usr/bin/python
import sys
sys.path.append('../') # So I can load pySchema4neo, yo
from pySchema4neo import Schema
import py2neo
myGraph = py2neo.Graph()
mySchema = Schema('../documentation/examples/schemas/exampleSchema.json', 'thisisnotapathjustaplaceholder', myGraph)
@jgillmanjr
jgillmanjr / style.sql
Last active February 13, 2016 04:05
SQL Styling example
SELECT
t.some_field,
t2.another_field
FROM
table t
INNER JOIN table2 t2 ON t.fkey = t2.pkey
WHERE
t.some_field = 'f00bar'
UNION SELECT
t3.field
@jgillmanjr
jgillmanjr / loader.py
Created April 5, 2017 06:33
Get into a django app from an external script - Django 1.10
import sys
import os
project_name = 'your_project'
project_path = '/your/path/here' # Or however you want to build it
project_settings_module = project_name + '.settings'
sys.path.append(project_path)
os.environ.setdefault('DJANGO_SETTINGS_MODULE', project_settings_module)
@jgillmanjr
jgillmanjr / keybase.md
Created May 25, 2018 19:47
keybase.md

Keybase proof

I hereby claim:

  • I am jgillmanjr on github.
  • I am jgillmanjr (https://keybase.io/jgillmanjr) on keybase.
  • I have a public key ASBPrEboq_LrUmj_fQq0qchobmj5DqcwbgIKJDOjyTpf1wo

To claim this, I am signing this object:

@jgillmanjr
jgillmanjr / parser_conv.py
Created October 20, 2018 05:06
Perl CIFP Parser main parser def conversion
# Parse the various parser pl files - because fuck manually working that shit if avoidable
# This is also making some horridly bad one-off assumptions. Not reusable *at all*
raw_parsers_pl = requests.get('https://raw.githubusercontent.com/jgillmanjr/parseCifp/master/parsers.pl').text.splitlines()
# Regexy shit
ntr_key_check_re = re.compile('\'([A-Z]*)\'')
sec_key_xit_re = re.compile('\}')
xit_key_check_re = re.compile('.*,')
has_sq_re = re.compile('\'')
parser_data_re = re.compile('.*([a-zA-Z]+:[0-9]+)')
@jgillmanjr
jgillmanjr / Build Michigan Cert Map.ipynb
Last active February 25, 2019 18:55
Build US Airman Database and Map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
date
ffmpeg -i "$1" -filter_complex "[0:a] showspectrum=s=1920x1080:slide=scroll:mode=combined:color=fruit:legend=disabled [v]" -map "[v]" -map 0:a -movflags faststart -c:v libx264 -b:v 10M -r 60 -c:a aac -b:a 512k "$2"
date