Outputs a limited file tree rooted at the current directory which highlights the position of the argument within the tree. Originally intended for FZF like so:
fzf --preview 'ptf.py {}'
Screenshot:
def get_pallet(scheme = 'dark', intensity = 'hard'): | |
if scheme not in ('dark', 'light'): | |
raise RuntimeError('Schme must be one of "dark", "light".') | |
if intensity not in ('hard', 'medium', 'soft'): | |
raise RuntimeError('Intensity must be one of "hard", "medium", "soft".') | |
pallet = None | |
if scheme == 'dark': | |
pallet = { | |
'fg': '#d3c6aa', |
{ | |
"_META": { | |
"year": 2001, | |
"source": "https://files.taxfoundation.org/20210217114725/State-Individual-Income-Tax-Rates-and-Brackets-for-2021.pdf", | |
"updates_and_fixes": "https://gist.github.com/Lanny/cfb412dba213b59c7c74d7b940e77e3f", | |
"description": "Extraction of taxfoundation.org's info on 2021 US state income taxes into JSON for automatic processing. Tax brackets are expressed as 2-tuples of incomeat the bottom of the bracket, and tax rate within that bracket (as apercentage)." | |
}, | |
"DATA": { | |
"AL": { | |
"BRACKETS": { |
import urllib2 | |
import time | |
from collections import defaultdict | |
def run_mr(mapf, reducef, data): | |
intr = defaultdict(list) | |
final = [] | |
def emitIntr(key, value): | |
intr[key].append(value) |
class MethodSplitView(object): | |
""" | |
A flexible class for splitting handling of different HTTP methods being | |
dispatched to the same view into seperate class methods. Subclasses may | |
define a separate class method for each HTTP method the view handles (e.g. | |
GET(self, request, ...), POST(self, request, ...) which will be called with | |
the usual view signature when that sort of reqeust is made. | |
Subclasses may also define a `pre_method_check` method which, if it returns | |
a HttpResponse, will be used to response to the request instead of |
#!/usr/bin/env python | |
import os | |
import sys | |
import subprocess | |
from fnmatch import fnmatch | |
from multiprocessing import Process, Queue | |
from Queue import Empty as QEmpty |
#!/usr/bin/env bash | |
targ_dir=`mktemp -d /tmp/fine_dir.XXXX` | |
find . -name "*$@*" | while read line; do | |
ln -s "$(pwd)/$line" "$targ_dir" | |
done | |
mvim "$targ_dir" |
int MARGIN = 30, | |
HEAD_SIZE = 200, // Jenkins, you bigheaded bastard | |
DRUM_ROWS = 3, | |
DRUM_COLS = 3, | |
SPACING = 10; | |
ArrayList<DrumHead> drums = new ArrayList<DrumHead>(); | |
ArrayList<PressArea> pressAreas = new ArrayList<PressArea>(); | |
class PressArea { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BackgroundBlur</key> | |
<real>0.0</real> | |
<key>BackgroundColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGISJYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKUHCBMXHlUkbnVsbNUJCgsMDQ4PEBESVk5TQ01ZS1xOU0NvbXBvbmVudHNcTlND |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="mh" | |
# Uncomment the following line to use case-sensitive completion. |