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
load data local infile 'c:/fierce/fwe_opens.csv' ignore into table opens fields | |
TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' | |
lines terminated by '\n' | |
(email,@check_time,@last_open,total_opens) | |
set mlid = 102866, | |
check_time = from_unixtime(@check_time), | |
last_open = if(@last_open<=0,NULL,date(from_unixtime(@last_open))) | |
; |
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/python | |
import pywapi # http://code.google.com/p/python-weather-api/ | |
import telnetlib | |
import sys | |
if len(sys.argv) != 3: | |
print "USAGE: python print_weather.py <ZIPCODE> <PRINTER_IP>" | |
exit() | |
location_id = sys.argv[1] |
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
<?php print '<?xml version="1.0" encoding="UTF-8"?>'; ?> | |
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"> | |
<channel> | |
<title>FierceWireless</title> | |
<link>http://www.fiercewireless.com</link> | |
<description> | |
The latest wireless industry news from FierceWireless | |
</description> | |
<language>en-us</language> |
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
# domain from email address | |
SELECT mid(email from locate('@',email)+1) as domain FROM emails; | |
# domain from URL (hacky) | |
SELECT MID(url,8,LOCATE('/',url,8)-8) AS domain FROM clicks |
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
# First: wget --random-wait --wait=2 --limit-rate=100K http://e.mybio.zerista.com/exhibitor?exhibitor_page={1..142} | |
# But that saves them with a stupid name, so rename using: | |
# ls -d exhib* | sed 's/\(.*\)=\(.*\)$/mv "&" "bio\2.html"/' | sh | |
# | |
from BeautifulSoup import BeautifulSoup | |
import csv | |
import glob | |
import os | |
writer = csv.writer(open("bio.csv", "wb")) |
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
javascript:var%20auto%20={names:%20'Steve%20Buscemi%20Catherine%20Keener%20Dermot%20Mulroney%20Danielle%20Zerneck%20James%20LeGros%20Rica%20Martens%20Peter%20Dinklage%20Kevin%20Corrigan%20Hilary%20Gilford%20Robert%20Wightman%20Tom%20Jarmusch%20Michael%20Griffiths%20Matthew%20Grace%20Ryan%20Bowker%20Francesca%20DiMauro',blurb:%20'phpBB%20is%20a%20free,%20open%20source%20Internet%20community%20application,%20with%20outstanding%20discussion%20forums%20and%20membership%20management.%20Written%20in%20the%20PHP%20scripting%20language,%20and%20making%20use%20of%20the%20popular%20MySQL%20database,%20phpBB%20is%20a%20standard%20among%20web%20hosting%20companies%20throughout%20the%20world,%20and%20is%20one%20of%20the%20most%20widely-used%20bulletin%20board%20packages%20in%20the%20world.%20phpBB%20short-circuits%20the%20need%20for%20you%20to%20be%20a%20web%20development%20master%20in%20order%20to%20create%20and%20manage%20massive%20online%20communities',password:%20'secret',fillerup:%20function()%20{var%20all_inputs%20= |
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
from django.contrib import admin | |
from django.contrib.flatpages.models import FlatPage | |
# Note: we are renaming the original Admin and Form as we import them! | |
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld | |
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld | |
from django import forms | |
from ckeditor.widgets import CKEditorWidget |
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
import sys | |
from BeautifulSoup import BeautifulSoup as bs | |
soup=bs(open(sys.argv[1],'r').read()) | |
print soup.prettify() |
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
from ctypes import * | |
from ctypeslib.contrib.pythonhdr import * | |
def quick_summary(data,words=150): | |
ots = OTS() | |
ots.parse_string(data) | |
return ots.summarize_by_words(words) | |
class OTS: | |
libots = None |
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
# This file has been modified by Eli Dickinson to update detection rules and to | |
# send a Vary header downstream. It has also been updated to | |
# work with newer versions of Varnish. | |
# | |
# A simple mobile device detection implementation in VCL | |
# http://fangel.github.com/mobile-detection-varnish-drupal | |
# | |
# The file is based upon initial work done by Audun Ytterdal, which can be |
OlderNewer