Skip to content

Instantly share code, notes, and snippets.

View panamantis's full-sized avatar

Jon panamantis

View GitHub Profile
@panamantis
panamantis / _.md
Created June 10, 2013 16:44
clip scale bug
@panamantis
panamantis / pdfxtract.py
Created February 7, 2016 01:02 — forked from jmcarp/pdfxtract.py
Extract text from PDF document using PDFMiner
"""
Extract PDF text using PDFMiner. Adapted from
http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library
"""
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter#process_pdf
from pdfminer.pdfpage import PDFPage
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
@panamantis
panamantis / README.md
Created February 16, 2016 16:12
gooey
@panamantis
panamantis / test.py
Created September 1, 2017 16:11 — forked from chintal/test.py
#!/usr/bin/env python
# encoding: utf-8
import os
import inspect
import time
import copy
from twisted.internet.protocol import Factory
@panamantis
panamantis / netcat
Created June 15, 2018 16:16 — forked from qbein/netcat
Replay pcap/pcapng TCP traffic using netcat
For development it may be useful to be able to replay TCP traffic (e.g. HTTP). The dump can be created using WireShark or tcpdump:
$ tcpdump -s 0 port http -i en0 -w dump.pcap
To generate data files that can be replayed through netcat we use tcptrace:
$ tcptrace -e input.pcapng
Finally replay the HTTP traffic using netcat to host 192.168.1.1 port 80
$ cat a2b_contents.dat | nc -v 192.168.1.1 80
If you need to replay the raw network traffic, we need to do some massaging using tcpprep and tcprewrite before using tcpreplay to replay the raw packages. Note that due to limitation of tcprewrite this will not replay any traffic to the network: http://tcpreplay.synfin.net/wiki/FAQ#Doestcpreplaysupportsendingtraffictoaserver.
@panamantis
panamantis / pytorch-lambda-deploy.sh
Created August 25, 2018 14:02 — forked from mjdietzx/pytorch-lambda-deploy.sh
AWS Lambda pytorch deep learning deployment package (building pytorch and numpy from source on EC2 Amazon Linux AMI)
#
# written for Amazon Linux AMI
# creates an AWS Lambda deployment package for pytorch deep learning models (Python 3.6.1)
# assumes lambda function defined in ~/main.py
# deployment package created at ~/waya-ai-lambda.zip
#
#
# install python 3.6.1
#
@panamantis
panamantis / install-sox-amazon-linux.sh
Created January 8, 2019 22:14 — forked from chrisjz/install-sox-amazon-linux.sh
Install sox on Amazon Linux
#!/bin/sh
mkdir sox
cd sox
wget http://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2.tar.gz
tar xvfz sox-14.4.2.tar.gz
cd sox-14.4.2
./configure
make -s
make install
@panamantis
panamantis / .block
Created October 31, 2019 11:49 — forked from nbremer/.block
Gooey effect - Data visualization showcase
height: 680
@panamantis
panamantis / gist:53b3b4c5d91adef0edaf3252ae05d001
Created November 21, 2019 14:22 — forked from dvliman/gist:10016069
join honey chrome extension
chrome.runtime.onStartup.addListener(function () {
chrome.storage.local.set({
log: ""
})
});
chrome.runtime.onInstalled.addListener(function (a) {
var b = {
log: ""
};
b.site_manifest = {
@panamantis
panamantis / gist:efbaa60f4149aaf82a249463ee37d649
Created November 21, 2019 14:23 — forked from dvliman/gist:10016177
joinhoney affiliate vendors
sites:
"joinhoney.com
cravehoney.com
wanelo.com
wish.com
acehardware.com
ae.com
aeropostale.com
amazon.com