Skip to content

Instantly share code, notes, and snippets.

View jacobkahn's full-sized avatar

Jacob Kahn jacobkahn

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jacobkahn on github.
* I am jacobkahn (https://keybase.io/jacobkahn) on keybase.
* I have a public key ASDukhNuTuFa6zcYoIgKqZOl-Mk9yhwaeV0o1T-qUzkd0Qo
To claim this, I am signing this object:
@jacobkahn
jacobkahn / pageCropper.py
Created March 2, 2017 21:48
Crops a PDF printout with multiple pages and aggregates into a single page.
import copy
from pyPdf import PdfFileWriter, PdfFileReader
input1 = PdfFileReader(file("in.pdf", "rb"))
output = PdfFileWriter()
numPages = input1.getNumPages()
for i in range(numPages):
masterPage = input1.getPage(i)
aggPageCollection = []
@jacobkahn
jacobkahn / .flowconfig
Created August 24, 2016 04:30
Flow Config that works with Create React App and Nuclide
[libs]
./node_modules/fbjs/flow/lib
[options]
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
module.name_mapper='^\(.*\)\.css$' -> 'react-scripts/config/flow/css'
module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|webp\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file'
@jacobkahn
jacobkahn / checkboxes.js
Created April 8, 2016 01:49
Check all checkboxes on a page with Javascript
(function() {
var aa = document.querySelectorAll("input[type=checkbox]");
for (var i = 0; i < aa.length; i++){
aa[i].checked = true;
}
})()