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
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- According to Heather Champ, former community manager at flickr, | |
you should not allow search engines to index your "Contact Us" |
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
require 'rubygems' | |
require 'yajl/json_gem' | |
module AP | |
# a = AP::ParseData.new('/file.txt') | |
class ParseData | |
def initialize(file) | |
@file = file | |
@ap_scratch = [] | |
@final_results = [] |
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
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(window).load(function(){ | |
$().hatchShow(); | |
}); | |
jQuery.fn.hatchShow = function(){ | |
$('.hsjs').css('display','inner-block').css('white-space','pre').each(function(){ | |
var t = $(this); | |
t.wrap("<span class='hatchshow_temp' style='display:block'>"); | |
var pw = t.parent().width(); |
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
///////// | |
// | |
// Things you need in place to use this: | |
// - have loaded jquery | |
// - have called your google map "map" and declared it globally | |
// such as: var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); | |
// - have <div id="address_module"></div> where you want your address box | |
// - call addressBoxSetup(); in your $(document).ready(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
import requests | |
import csv | |
from pyquery import PyQuery as pq | |
f = open('strike_all_bills.csv', 'w') | |
wr = csv.DictWriter(f, ['billno']) | |
req = requests.get('http://www.azleg.gov/StrikeEverything.asp') | |
html = pq(req.text) | |
rows = html('tr.TableHeaderBackground').siblings() |
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 gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.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
var user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: false | |
); |
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 urllib2 | |
# Python port of this Ruby script: http://pastebin.com/VHnSRs3t | |
# Bring in two helper functions from our code library. | |
from scraper_helper import get_twitter_user, get_user_tweets | |
# URL for a file with a list of Congress members' Twitter names. | |
csv_url = "http://nottwitter.danwin.com.s3.amazonaws.com/cmembers.txt" | |
# Name of a file (on your hard drive) to hold the script results. |
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
#ADRIA, F. | |
"We didn't create dishes. We create preparations to create many dishes." - Ferran Adria | |
#BOURDAIN, A. | |
"This bus makes many stops. I have no expectation that you will like all of them." - @Bourdain | |
#BOYER, B. | |
"Election maps lie." - @brianboyer | |
"Who are our users? What do they need?" - @brianboyer |
OlderNewer