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 | |
# | |
############################################################################## | |
# Copyright 2002-2013 LAMP/EPFL | |
# | |
# This is free software; see the distribution for copying conditions. | |
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A | |
# PARTICULAR PURPOSE. | |
############################################################################## |
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
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
# Right now it won't download same file name twice even if their contents are different. | |
import email | |
import getpass, imaplib | |
import os | |
import sys | |
detach_dir = '.' |
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
require 'ruby-box' #gem install ruby-box | |
require 'term/ansicolor' #gem install term-ansicolor | |
include Term::ANSIColor | |
MODIFIED_AT_CUTOFF = Time.new(2013,7,1) | |
session = RubyBox::Session.new({ | |
client_id: "YOUR_CLIENT_ID", | |
client_secret: "YOUR_CLIENT_SECRET", |
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 | |
# sort the output of gdrive list | |
# takes a folder_id as argument, returns a sorted list of items in the corresponding folder | |
# TODO: sort by item title while keeping the id in the output | |
# | |
if [ $# = 0 ]; then | |
echo -e "you must provide a folder_id\nType -h or --help for details" | |
exit 0 | |
fi | |
if [ $1 = "-h" ] || [ $1 = "--help" ] |
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
#******************************************************************************* | |
# chpy.py | |
# Zac Hester <[email protected]> | |
# 2012-08-07 | |
# | |
# Change the Windows file association for .py to a given Python interpretor. | |
# | |
# For usage examples, type: | |
# chpy.py help | |
# |
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 | |
# | |
# More of a reference of using jinaj2 without actual template files. | |
# This is great for a simple output transformation to standard out. | |
# | |
# Of course you will need to "sudo pip install jinja2" first! | |
# | |
# I like to refer to the following to remember how to use jinja2 :) | |
# http://jinja.pocoo.org/docs/templates/ | |
# |
NewerOlder