- Create Automator Folder Action.
- Add Folder to watch.
- In Picker, enter
CMD + SHIFT + G
and type/Volumes/
- Click Choose.
- Add Run Script to Automation.
- Use /bin/bash or /bin/zsh.
- Example rsyncs:
#!/usr/bin/env bash
CMD + SHIFT + G
and type /Volumes/
#!/usr/bin/env bash
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. |
#!/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 |
# Modified version where you can press | |
# - CTRL-O to open with `open` command, | |
# - CTRL-E or Enter key to open with the $EDITOR | |
# - CTRL-S to search inside files | |
# - CTRL-C to copy file path to clipboard | |
# - CTRL-D to cd to directory of file | |
# - CTRL-N to make a new markdown file. | |
fs() { | |
local out file key | |
IFS=$'\n' out=($(fzf -i --preview="pygmentize -g {}" --query="$1" --exit-0 --expect=ctrl-o,ctrl-e,ctrl-s,ctrl-m,ctrl-c,ctrl-d,ctrl-x,ctrl-n --bind '?:toggle-preview')) |
filetype plugin indent on | |
:ab #b /************************************************ | |
:ab #e ************************************************/ | |
set nocompatible | |
set modelines=0 | |
set autowrite | |
set backspace=indent,eol,start | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |
This script is intended to run in Pythonista on iOS. It works equally well on desktop OSs. Installation instructions will be solely for Pythonista.
dailytracker.py
and paste the contents.#!/usr/bin/env python3 | |
import argparse | |
def naive_reverse(input_list: [str]): | |
new_list = [] | |
size = len(input_list) - 1 | |
for i in range(0, len(input_list)): | |
new_list.append(input_list[size - i]) | |
return new_list |
{ | |
"Red": { | |
"id": "Red", | |
"name": "Red Line", | |
"type": 1, | |
"options": { | |
"Ashmont/Braintree": 0, | |
"Alewife": 1 | |
}, | |
"stops": { |
type OptionBranch = Option<Box<Tree>>; | |
#[derive(Debug)] | |
struct Tree { | |
data: i32, | |
branches: (OptionBranch, OptionBranch) | |
} | |
impl Tree { | |
fn new(data: i32) -> Self { |
fn is_sorted(input: &str) -> bool { | |
let input_iter: Vec<_> = input.chars().collect(); | |
let initial = input_iter[0]; | |
input | |
.chars() | |
.fold(Some(initial), |acc, current| { | |
if acc != None { | |
if Some(current) >= acc { | |
return Some(current) | |
} else { |