This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " => General | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " Line numbers | |
| set number | |
| " Search highlighting | |
| set hlsearch | |
| " Sets how many lines of history VIM has to remember |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import argparse | |
| import spotipy | |
| import spotipy.util as util | |
| """ | |
| top_songs.py | |
| See https://lewery.ca/automation/spotify-top-songs/ for detailed | |
| instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias vi='vim' | |
| alias bim='vim' | |
| # grep | |
| alias g='grep -sr' | |
| alias gg='grep -isr \!:1 *' | |
| alias gx='grep -isr --exclude-dir=\!:! \!:2 *' | |
| alias gp="grep --exclude='*[.py[~c]]" | |
| # other |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set _document to theFile | |
| -- Open a docx document in pages and auto export to PDF | |
| tell application "Finder" | |
| set _directory to get container of file _document | |
| set _documentName to name of _document | |
| -- Figure out document name without extension | |
| if _documentName ends with ".docx" then ¬ | |
| set _documentName to text 1 thru -6 of _documentName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (*using terms from application "Mail" | |
| on perform mail action with messages theMessages for rule theRule*) | |
| -- Adapted from: http://www.markosx.com/thecocoaquest/automatically-save-attachments-in-mail-app/ | |
| -- For usage instructions, see: https://lewery.ca/automation/autosave-email-attachments | |
| set MainFolder to "Dropbox" -- After the current users home dir | |
| set subFolder to "mail" | |
| -- The folder to save the attachments in (must already exist) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| Convert all saved Reddit links to Pinboard bookmarks | |
| """ | |
| import os | |
| import argparse | |
| import pinboard | |
| import praw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import argparse | |
| import spotipy | |
| import spotipy.util as util | |
| """ | |
| top_songs.py | |
| This script requires spotipy: https://github.com/plamere/spotipy | |
| Automates creation of a 'Top Songs' playlist on Spotify. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import os | |
| import re | |
| import shutil | |
| import argparse | |
| """ | |
| video-filer.py | |
| Files TV shows in the format in the format | |
| '$show$season$episode$garbage.$ext' to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Find and open in vim (if more than one file vim will open each in it's own buffer | |
| find . -iname "$1" -exec vim {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Delete all saved posts / comments on your reddit account with PRAW. | |
| See: https://lewery.ca/automation/delete-all-saved-reddit-links | |
| Needs Python 3+ and Praw 5.3.0 | |
| """ | |
| import argparse | |
| import praw |
NewerOlder