start new:
tmux
start new with session name:
tmux new -s myname
pdftk original.pdf output uncompressed.pdf uncompress | |
LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf | |
pdftk stripped.pdf output final.pdf compress |
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
# Piece-by-Piece Explanation: | |
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
# the $PROMPT_COMMAND environment variable is executed every time a command is run | |
# see: ss64.com/bash/syntax-prompt.html |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
#!/bin/bash | |
# by Andy Maloney | |
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/ | |
# make sure we are in the correct dir when we double-click a .command file | |
dir=${0%/*} | |
if [ -d "$dir" ]; then | |
cd "$dir" | |
fi |
xattr -d com.apple.quarantine /path/to/app/myMacApp.app |
alabaster | |
anaconda-client | |
anaconda-navigator | |
anaconda-project | |
appnope | |
appscript | |
asn1crypto | |
astroid | |
astropy | |
babel |
% Biblatex style for the American Journal of Transplantation (similar to AMA style) | |
% I used remus' suggestions as a template: https://tex.stackexchange.com/a/233423/115062 | |
% To use this just include in your tex-file | |
% configuring package options | |
\usepackage[backend=bibtex, bibencoding=utf8, citestyle=numeric-comp, bibstyle=numeric, sorting=none, maxbibnames=6, minbibnames=3, doi=false, isbn=false, url=false, uniquename=false, uniquelist=false, firstinits=true, terseinits=true]{biblatex} | |
% BEGIN DEFINE CITATION STYLE | |
% first after last name | |
\DeclareNameAlias{default}{last-first} |
import re | |
import json | |
# save the positive words into a list called p_list | |
with open('positive.txt') as f: | |
p_txt = f.read() | |
p_txt = re.sub('[,\.()":;!@#$%^&*\d]|\'s|\'', '', p_txt) | |
p_list = p_txt.replace('\n',' ').replace(' ',' ').lower().split(' ') | |
# test if cool is in the list | |
print 'cool is in the postive list: ', 'cool' in p_list |
Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.