[ Launch: Single-stack line chart ] 5699495 by aendrew
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 | |
/* | |
* Converts CSV to JSONP by Ændrew Rininsland | |
* Gratuitous fork of "Converts CSV to JSON" by Rob Flaherty | |
* -- See: http://www.ravelrumba.com/blog/json-google-spreadsheets/ | |
* Example uses Google Spreadsheet CSV feed | |
*/ | |
header('Content-type: script/javascript'); |
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 | |
/** | |
* I'm using WP Alchemy as a way to select images that have been pulled from a Pinterest board. | |
* As a result, each image has two properties: URL and Title. | |
* All the examples for the Checkbox/Multicheckbox form type involve feeding a simple array into a loop of some sort: | |
*/ | |
?> | |
<?php $items = array('a', 'b', 'c'); ?> | |
<?php foreach ($items as $i => $item): ?> |
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
$('.view-homepage-slider').cycle({ | |
fx: 'fade', | |
speed: 'slow', | |
timeout: 0, | |
before: onBefore, | |
after: onAfter, | |
}); | |
function onBefore(curr, next, opts){ |
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
function (currSlideElement, nextSlideElement, options, forwardFlag){ | |
$(currSlideElement).children('.views-field-title').slideUp(); | |
$(currSlideElement).children('.views-field-field-homepage-slider-text').slideUp(); | |
} |
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 | |
register_activation_hook(__FILE__, 'activate_my_plugin'); | |
function activate_my_plugin() { | |
// Some basic securifying | |
if ( ! current_user_can( 'activate_plugins' ) ) | |
return; | |
$plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : ''; | |
check_admin_referer( "activate-plugin_{$plugin}" ); |
I hereby claim:
- I am aendrew on github.
- I am aendra (https://keybase.io/aendra) on keybase.
- I have a public key ASDXFgxGnrfWtsZP1091Zfi1tEPw6YdJvpxMiZys7J_ugwo
To claim this, I am signing this object:
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
{ | |
"id": "0d19ea7d-8803-9f84-32f0-096a055e1d3e", | |
"name": "Dreamhost API", | |
"timestamp": 1410102836319, | |
"requests": [{ | |
"collectionId": "0d19ea7d-8803-9f84-32f0-096a055e1d3e", | |
"id": "00c11594-394a-410e-9847-760aaa3f1bc8", | |
"name": "MySQL — Add hostname", | |
"description": "<a href=\"http://wiki.dreamhost.com/API/Mysql_commands#mysql-add_hostname\">Adds a MySQL hostname</a>.<br/>\n<b>hostname:</b> the full hostname you want to serve as a mysql hostname (unless the domain following the first . is hosted with Dreamhost, you will not be able to access phpMyAdmin from this hostname).", |
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 | |
### dump_mysql_for_rds.sh | |
## 2014 Ændrew Rininsland (@aendrew) | |
# usage: ./dump_mysql_for_rds.sh <root_user> <password> <path_to_mysql_socket> <dbs,to,exclude> <filename for dump> | |
ARG_DBUSER=$1 | |
ARG_DBPASS=$2 | |
ARG_DBSOCKET=$3 | |
ARG_EXCLUDE=$4 | |
ARG_DUMPFILE=$5 |
OlderNewer