Part of a series of examples. See:
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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
| <script src="http://cmx.io/v/0.1/cmx.js"></script> | |
| <body> | |
| <scene id="scene1"> | |
| <label t="translate(0,346)"> | |
| <tspan x="0" y="0em">Comix Sample</tspan> | |
| </label> | |
| <actor t="translate(150,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59"> |
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 | |
| function add_my_script() { | |
| wp_enqueue_script( | |
| 'my-script', // The name of your script | |
| get_stylesheet_directory_uri().'/my-script.js', // Your script | |
| array('jquery') // Dependencies - so it knows to put your script AFTER jQuery | |
| ); | |
| } | |
| add_action('wp_enqueue_scripts', 'add_my_script'); // The action that will add your script |
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 | |
| # First install https://github.com/facebook/phpsh | |
| # And ctags https://github.com/mxcl/homebrew/blob/master/Library/Formula/ctags.rb | |
| # From http://vocecommunications.com/blog/2010/12/how-to-setup-an-interactive-wordpress-shell/ | |
| if [ ! -f ./.wp-shell.php ]; | |
| then | |
| echo '<?php include_once("wp-load.php"); include_once("wp-admin/includes/admin.php"); ?>' > ./.wp-shell.php | |
| fi |
Part of a series of examples. See:
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
| // Use a simple jQuery GET request to get the data from export and return it to myQuery variable | |
| $.get( | |
| 'http://hq-salsa.wiredforchange.com/dia/hq/export.jsp?', | |
| { 'query_KEY': 196951, 'type':'csv','include':'supporter_KEY,First_Name,Last_Name,Email'}, | |
| function(result) { myQuery = csvImport( result ); } | |
| ) | |
| // Here's a function to parse the CSV and return the results as objects - using the first row as a name sequence | |
| function csvImport( blob ) { |
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
| <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> | |
| <script type="text/javascript"> | |
| var addresses = [ ], // Addresses you want matched | |
| fixed = [ ], // Where they'll get put eventually | |
| g = new google.maps.Geocoder | |
| function newAddress(address) { | |
| var theaddress = address || addresses.shift() | |
| function newAddress(address) { |
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
| [ | |
| { // Example of a Candidate Race | |
| // The name of the particular race or ballot measure | |
| "contest": "US House", | |
| // The type, can be Federal, State, County, Other, Ballot_Statewide (catch-all for ballot measures), User_Candidate, User_Measure (both are user-generated content) | |
| "contest_type": "Federal", | |
| // Name of the race - auto generated for candidates |
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
| <iframe src="http://theballot.org/?iframe=500" width="500" height="1000" style="width: 500px; height: 1000px; overflow-y: auto; overflow-x: hidden; border: none;" scrolling="yes" ></iframe> |
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
| /** | |
| API DOC: https://developers.google.com/google-apps/spreadsheets/ | |
| Some things to remember: | |
| - Get the Sheet ID "gid" by using the https://developers.google.com/google-apps/spreadsheets/#retrieving_information_about_worksheets | |
| - Google API cannot handle spaces in it's SQL queries - make sure to wrap queries in " (not ') | |
| - Column A is a "label" column - cannot query on it. Hide it | |
| - Google returns results row contents a comma separated cell - googleParse function can convert into an object - including cell contents with commas. Cells with ': ' (including the space) may break it. | |
| **/ |