Skip to content

Instantly share code, notes, and snippets.

@masterdje
masterdje / HomePass2.sh
Created October 17, 2013 19:55
HomePass2.sh : Transform your OpenWrt router into an NintendoZone, to get a big load of Streetpasses... Script from reddit User : http://www.reddit.com/user/alexatkinuk on the topic : http://www.reddit.com/r/3DS/comments/1k0g58/setting_up_a_streetpass_relay_at_home/cbl3onj ... He truly deserves all the glory, as we use also his custom Mac list (…
#/bin/sh
# HomePass
DATE=$(date)
# Put a filename and path in here if you wish to log each profile change
LOG="HomePass.log"
# The WiFi network number we need to toggle the MAC address of
# You must have already added a WiFi network with the ssid "attwifi" and clicked "save & apply"
WIFI=$(uci show wireless | grep "ssid=attwifi" | awk 'NR>1{print $1}' RS=[ FS=])
# MAC address list is missing or empty, reload it from the server
if [ ! -s HomePass.list ]; then
@masterdje
masterdje / mangasplit.py
Last active December 23, 2015 13:39
Main Objective : Better graphical ebook reading on strict vertical-reading device, like the Kobo Touch and Kobo Glo
# Open any graphical ebook file ( cbr / cbz),
# and check every pic inside for anything in landscape mode, to cut it in half.
# Then reorder everything, and save the cbr/z as if nothing happened (huh huh)
#
# There are un bunch of more switchs (force b&w render, reverse order (manga anyone ?), jump to page X etc) to play with.
#
# Mangasplit.py is still really -rough to the edge-
# Feel free to improve...
#forked to ensure python 3.2+ compatibility & gmail API updates ...
#need more work as it crashes when encounters a mime type declared as "nonetype" ...
#coming soon :)
#
#original comments:
# 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