Skip to content

Instantly share code, notes, and snippets.

View dustinknopoff's full-sized avatar

Dustin Knopoff dustinknopoff

View GitHub Profile
@dustinknopoff
dustinknopoff / splitPDFs.py
Last active July 8, 2018 14:33
PDF Splitter by variable intervals. Requires PyPDF2 using Python2.7. (On Macs install with "sudo pip install pypdf2" in terminal.
#!/usr/bin/env python2.7
import os
import PyPDF2
class pdfSplitter():
def __init__(self, original_pdf, out_name, splits):
"""
Creates new instance of pdfSplitter class
@dustinknopoff
dustinknopoff / README.md
Last active December 12, 2024 19:57
Automatically Save emails to a folder using Mail.app, AppleScript, and Bash.

How to get it to work.

NOTE: This is mac only.

  1. Go to Finder.
  2. Press CMD+SHIFT+G.
  3. Type ~/Library/Application Scripts/com.apple.mail.
  4. Open saveByRule.scpt and change theFolder to where you'd like emails to be saved.
  5. Copy and Paste saveByRule.scpt into ~/Library/Application Scripts/com.apple.mail.
  6. Go to Mail>Preferences>Rules>Add Rule.
@dustinknopoff
dustinknopoff / bestappsever-talk.py
Last active June 27, 2018 18:09
Attempting to Tokenize out best apps ever for MPU'ers.
from collections import Counter
import nltk
import requests
from bs4 import BeautifulSoup
# def isApp(word):
# """
# Checks to see if given word is a Mac or iOS app.
@dustinknopoff
dustinknopoff / syncexample.md
Created April 17, 2018 18:58
NAS and External Hard Drive sync example using rsync and Automator
  1. Create Automator Folder Action.
  2. Add Folder to watch.
  3. In Picker, enter CMD + SHIFT + G and type /Volumes/
  4. Click Choose.
  5. Add Run Script to Automation.
  6. Use /bin/bash or /bin/zsh.
  7. Example rsyncs:
#!/usr/bin/env bash