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
| # Bindings {{{ | |
| # Remap prefix | |
| # unbind C-b | |
| # set -g prefix C-a | |
| # set-option -g default-command "reattach-to-user-namespace -l /usr/local/bin/bash" | |
| # set -g mode-mouse on | |
| # Quick key for moving back to the previous window | |
| bind-key L last-window |
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
| # cd to the current Path Finder directory | |
| # https://github.com/niksy/dotfiles/blob/master/.functions | |
| function cdf() { | |
| target=$(osascript -e 'tell application "Finder" to get the POSIX path of (target of front window as alias)') | |
| cd "$target" | |
| } | |
| # function cdf() { | |
| # cd "$(osascript -e 'tell application "Path Finder" to POSIX path of the target of the front finder window')" | |
| # } |
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
| # Self | |
| alias bashrc='$EDITOR ~/.bashrc && source ~/.bashrc' | |
| alias aliases='$EDITOR ~/.aliases && source ~/.aliases' | |
| alias functions='$EDITOR ~/.functions && source ~/.functions' | |
| alias vim="nvim" | |
| alias nvimrc='nvim ~/.config/nvim/init.vim' | |
| # Unix | |
| alias c="clear" |
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
| ||ci4.googleusercontent.com/proxy^/[a-zA-Z0-9_=-]+#https?/ | |
| ||ci6.googleusercontent.com/proxy^/[a-zA-Z0-9_=-]+#https?/ | |
| ||ci5.googleusercontent.com/proxy^/[a-zA-Z0-9_=-]+#https?/ |
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 | |
| diskutil umount disk2s2 \ | |
| && sudo mkdir /Volumes/mydrive \ | |
| && sudo mount -t hfs -o nosuid,-w /dev/disk2s2 /Volumes/mydrive | |
| # sudo mount -t hfs -o nosuid,-w,-m=755 |
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 | |
| # rename 's/ - [a-zA-Z.]+\.flac/\.flac/' *.flac | |
| for file in *.flac; do | |
| # metaflac --show-tag=TITLE "${file}" | |
| metaflac --remove-tag=COMMENT "${file}" | |
| done | |
| for file in *.flac; do |
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
| tell application "Safari Technology Preview" | |
| set allWindows to every window | |
| set resultText to "" | |
| repeat with currentWindow in allWindows | |
| set tabcount to number of tabs in currentWindow | |
| -- log tabcount | |
| repeat with x from 1 to tabcount | |
| set tabName to name of tab x of currentWindow | |
| set tabURL to URL of tab x of currentWindow | |
| -- Markdown link format |
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 | |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| import argparse | |
| import datetime | |
| import itertools | |
| import os | |
| import subprocess | |
| import time | |
| import re |
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/sh | |
| tmpdir=`mktemp -d psd_XXX` | |
| old_ifs="$IFS"; IFS=$'\n' | |
| for file in $(find . -type f -name "*.psd" 2>/dev/null); do | |
| # du -sh "$file" | |
| echo "$file" | |
| mv "$file" "$tmpdir" | |
| done | |
| IFS="$old_ifs"; unset old_ifs |
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 | |
| delta=10 | |
| output=$(echo "$1" | sed s/.pdf/_scaled.pdf/) | |
| width="612" # width of Letter in points | |
| height="792" # height of Letter in points | |
| shift=$(echo "scale=4; ${delta} / 2" | bc) | |
| dwidth=$(echo "scale=4; ${width}"'*'"( ${shift} / 100 )" | bc) |
NewerOlder