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 | |
# encoding: utf-8 | |
""" | |
MONitor & EXecute | |
Yong-Yeol Ahn (http://yongyeol.com/) | |
This script monitors multiple files and executes the given command when | |
any of those files is changed. | |
""" |
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
import execnet, gevent | |
# Use boto to get images ip | |
from boto.ec2.connection import EC2Connection | |
conn = EC2Connection('secret', 'secret') | |
my_ami = conn.get_all_instances() | |
my_instances = my_ami[1].instances | |
servers = [] | |
for instance in my_instances: | |
servers.append(instance.public_dns_name) |
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 palette defined (0 0.0 0.0 0.5, \ | |
1 0.0 0.0 1.0, \ | |
2 0.0 0.5 1.0, \ | |
3 0.0 1.0 1.0, \ | |
4 0.5 1.0 0.5, \ | |
5 1.0 1.0 0.0, \ | |
6 1.0 0.5 0.0, \ | |
7 1.0 0.0 0.0, \ | |
8 0.5 0.0 0.0 ) |
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 bash | |
# these can also be commandline args... | |
OLD_TEX=paper_orig.tex # previous draft, submission, etc. | |
NEW_TEX=paper.tex # current working version | |
if [[ "$1" = 'clean' ]]; then | |
rm -f diff* | |
else | |
latexdiff $OLD_TEX $NEW_TEX > diff.tex |