This file contains 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
CmdUtils.CreateCommand({ | |
names: ["dzone", "dz"], | |
homepage: "http://eriwen.com/extras/dzone.html", | |
icon: "http://www.dzone.com/favicon.ico", | |
author: { name: "Eric Wendelin", email: "[email protected]" }, | |
license: "GPL", | |
description: "Submit the current page to DZone", | |
help: "Running this command will submit the current page to DZone", | |
_title: function() { |
This file contains 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 | |
# sample usage: checksites.py eriwen.com nixtutor.com yoursite.org | |
import pickle, os, sys, logging | |
from httplib import HTTPConnection, socket | |
from smtplib import SMTP | |
def email_alert(message, status): | |
fromaddr = '[email protected]' |
This file contains 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 expires header and Remove ETags | |
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$"> | |
Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT" | |
Header unset ETag | |
FileETag None | |
</FilesMatch> | |
# Set cache-control header | |
<FilesMatch "\.(ico|jpg|png|gif)(\.gz)?$"> | |
Header set Cache-Control "public" |
This file contains 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 | |
# Usage: ./check_feedburner.py MyFeedName | |
import re, sys, urllib, fileinput | |
from xml.dom import minidom | |
AWARENESS_API_URL = 'https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=%s' | |
# If you want to replace the feedburner count in a given file, define it here | |
FEED_COUNT_FILE = '/path/to/your/file.php' |
This file contains 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
/* Do not remove the @namespace line -- it's required for correct functioning */ | |
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
/* Add a keyword when adding a bookmark */ | |
#keywordRow { display: -moz-grid-line !important; } | |
/* Remove extra padding from the Navigation Bar */ | |
.toolbarbutton-1, .toolbarbutton-menubutton-button { | |
padding: 2px 3px !important; | |
} |
This file contains 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
def memoize(fn): | |
cache = {} | |
def wrapper(*args): | |
try: | |
return cache[args] | |
except: | |
result = fn(*args) | |
cache[args] = result | |
return result | |
return wrapper |
This file contains 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 | |
import sys, re | |
ip_regex = re.compile('(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})') | |
ip_match = ip_regex.match(sys.argv[1]) | |
if (ip_match == None): | |
print 'Invalid address' | |
sys.exit(1) | |
hex_ip_addr = 0 | |
for i in range(1,5): |
This file contains 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/bash | |
# Git repository updater | Spencer Tipping | |
# Run this from a cron job to update all repos on a regular basis. | |
for file in *; do | |
[[ -d $file && -d $file/.git ]] || continue | |
cd $file | |
${GIT:-git} pull >& /dev/null || echo "Failed to update $file: $(${GIT:-git} pull 2>&1)" | |
cd .. | |
done |
This file contains 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
<project name="eriwen-static" default="prod" basedir="."> | |
<property name="src.dir" location="${basedir}/static" /> | |
<property name="js.version" value="2" /> | |
<property name="css.version" value="17" /> | |
<target name="prod" depends="js.concatenate, js.minify, css.minify" | |
description="Full production build"> | |
</target> | |
<target name="load.properties"> |
This file contains 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
/* Default Important Label */ | |
treechildren::-moz-tree-cell(lc-FF0000) { | |
border-bottom: 1px solid #FF0000 !important; background-color: #FFCCCC !important; | |
} | |
treechildren::-moz-tree-cell-text(lc-FF0000) { | |
color: #000000 !important; | |
} | |
treechildren::-moz-tree-cell(lc-FF0000, selected) { | |
background-color: #FF0000 !important; | |
} |
OlderNewer