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
echo "set completion-ignore-case On" > ~/.inputrc |
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
compaudit | xargs chmod g-w | |
mkdir ~/.ssh | |
touch ~/.ssh/known_hosts |
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
# microbloggable.py | |
# breaks a story up into notices or tweets | |
# By Matt Katz: http://www.morelightmorelight.com | |
# this code is public domain but please | |
# say hi: http://identi.ca/mattkatz | |
# open a file | |
text_in = 'c:/last-beautiful.txt' | |
output = 'c:/twitterable.txt' | |
def process_story(file_in, file_out): |
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
""" | |
Lays down the law for your phone, telling it what to do and when | |
Inspired by docblades' silent_night.py | |
""" | |
import android, string, time, math, datetime | |
from datetime import time, datetime, timedelta | |
from time import sleep | |
from threading import Timer | |
droid = android.Android() | |
interval_secs = 480 |
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 android | |
droid = android.Android() | |
code = droid.scanBarcode()[1] | |
isbn = code['extras']['SCAN_RESULT'] | |
url = "http://librarything.com/isbn/%s" % isbn | |
droid.startActivity('android.intent.action.VIEW', url) |
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
//merging http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html | |
//and http://vafer.org/blog/20071112204524 | |
ftpClient = getConnectedFTPClient(); | |
public class GalleryLister{ | |
public FTPClient mFtp; | |
public ArrayList mAccumulator; | |
private String sep = "|"; | |
private String prefix = ""; |
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
#top { | |
position:absolute; | |
right:50px; | |
top:5px; | |
} | |
#bottom { | |
position:absolute; | |
right:5px; | |
top:30px; | |
} |
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
from pyechonest import config | |
from pyechonest import catalog | |
import uuid | |
import time | |
def print_timing(func): | |
def wrapper(*arg): | |
t1 = time.time() | |
res = func(*arg) |
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
#RewriteEngine On | |
# Some hosts may require you to use the `RewriteBase` directive. | |
# If you need to use the `RewriteBase` directive, it should be the | |
# absolute physical path to the directory that contains this htaccess file. | |
# | |
#RewriteBase / | |
#RewriteCond %{REQUEST_FILENAME} !-f | |
#RewriteRule ^(.*)$ index.php [QSA,L] |
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
<?php | |
// Set the headers so the file downloads | |
header('Content-type: application/xml+opml'); | |
header('Content-Disposition: attachment; filename="Wordprss-OPML-Export.xml"'); | |
//oh PHP. Why you gotta be so difficult about escaping things? | |
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?".">"; | |
?> | |
<opml version="1.0" > | |
<head> |
OlderNewer