Skip to content

Instantly share code, notes, and snippets.

View HauptJ's full-sized avatar
:octocat:
Tschüss STL

Joshua Haupt HauptJ

:octocat:
Tschüss STL
View GitHub Profile
@HauptJ
HauptJ / pdfxtract.py
Created January 8, 2020 00:54 — 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
@HauptJ
HauptJ / update_git_repos.sh
Created November 2, 2018 21:59 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@HauptJ
HauptJ / win-updates.ps1
Created February 18, 2018 01:22 — forked from joefitzgerald/win-updates.ps1
Install All Windows Updates, Rebooting As Many Times As Required
param($global:RestartRequired=0,
$global:MoreUpdates=0,
$global:MaxCycles=10)
function Check-ContinueRestartOrEnd() {
$RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$RegistryEntry = "InstallWindowsUpdates"
switch ($global:RestartRequired) {
0 {
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry