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
| /************************************************************************** | |
| * Name: EmbedPicasaGallery | |
| * Author: Tobias Oetiker <tobi@oetiker.ch> | |
| * Demo: http://tobi.oetiker.ch/photo/ | |
| * $Id: jquery.EmbedPicasaGallery.js 474 2011-06-16 09:02:45Z oetiker $ | |
| ************************************************************************** | |
| Description: | |
| [elided] |
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 // CraigMailer | |
| $to_email = 'lance@lrvick.net'; // the email all postings should be sent to | |
| $sqlite_file = 'craigmailer.sqlite'; // sqlite file location | |
| $city = 'orlando'; // city to watch (as per cl subdomain) | |
| $topics = array('cpg','sad','web','sof','eng'); // topics (three char topics as used in cl urls) | |
| $handle = sqlite_open($sqlite_file, 0666, $sqlite_error) or die("Could not open database"); | |
| $query = sqlite_query($handle,"SELECT name FROM sqlite_master WHERE type='table'"); | |
| if (!sqlite_fetch_array($query)){ | |
| sqlite_query($handle,"CREATE TABLE posts (id INTEGER(15) PRIMARY KEY NOT NULL,timestamp DATETIME NOT NULL,topic CHAR(4) NOT NULL, subject CHAR(255) NOT NULL, email CHAR(255) NOT NULL, body TEXT, mail_sent INTEGER(1) DEFAULT 0 NOT NULL);") |
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/bash | |
| for NPA in {201..989}; do | |
| NXXX=2000 | |
| while [ ${NXXX} -lt 9999 ]; do | |
| NXXX1=$[$NXXX+1] | |
| NXXX2=$[$NXXX+2] | |
| NXXX3=$[$NXXX+3] | |
| echo "Checking ${NPA}${NXXX}XXX, ${NPA}${NXXX1}XXX, | |
| ${NPA}${NXXX2}XXX, ${NPA}${NXXX3}XXX..." | |
| URL="http://www.whitepages.com/carrier_lookup?carrier=alltel&name;_0=&number;_0=${NPA}${NXXX}000&name;_1=&number;_1=${NPA}${NXXX1}000&name;_2=&number;_2=${NPA}${NXXX2}000&name;_3=&number;_3=${NPA}${NXXX3}000&localtime;=survey" |
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 scrapy.http import Request | |
| from scrapy.spider import BaseSpider | |
| from scrapy.selector import HtmlXPathSelector | |
| class HackernewsSpider(BaseSpider): | |
| name = 'hackernews' | |
| allowed_domains = [] | |
| start_urls = ['http://news.ycombinator.com'] | |
| def parse(self, response): | |
| if 'news.ycombinator.com' in response.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
| // convert 0..255 R,G,B values to binary string | |
| RGBToBin = function(r,g,b){ | |
| var bin = r << 16 | g << 8 | b; | |
| return (function(h){ | |
| return new Array(25-h.length).join("0")+h | |
| })(bin.toString(2)) | |
| } | |
| // convert 0..255 R,G,B values to a hexidecimal color string | |
| RGBToHex = function(r,g,b){ |
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 eventlet | |
| from eventlet.green import urllib2 | |
| def request(): | |
| urllib2.urlopen("http://yourtarget.com").read() | |
| print "%s request sent" | |
| pool = eventlet.GreenPool(size=1000) | |
| while True: |
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
| var baez = (function(){ | |
| var stopwords = ['i','in','and','to','are','the','but','my','they','those','them','you','a'] | |
| function tokenize(sample){ | |
| var tokens = [] | |
| sample.split(' ').forEach(function(token){ | |
| if (baez.stopwords.indexOf(token) & /^[a-zA-Z0-9]+$/.test(token)){ |
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 flask import Flask, request, redirect, url_for | |
| from rauth.service import OAuth1Service, OAuth2Service | |
| github = OAuth2Service( | |
| name='github', | |
| consumer_key='GITHUB_CONSUMER_KEY', | |
| consumer_secret='GITHUB_CONSUMER_SECRET', | |
| access_token_url='https://github.com/login/oauth/access_token', | |
| authorize_url='https://github.com/login/oauth/authorize', | |
| ) |
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
| USER='lrvick' | |
| cd /data/local/arch | |
| if ! mountpoint -q dev; then | |
| mount -t proc /proc proc | |
| mount -o bind /dev dev | |
| mount -o bind /dev/pts dev/pts | |
| fi |
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 hd44780 import HD44780 | |
| from os import stat | |
| from time import sleep | |
| lcd = HD44780() | |
| lcd.message(" Quake3 Logger\nCommence killing...") | |
| logfile_name = 'game.log' |