Skip to content

Instantly share code, notes, and snippets.

@ashleydw
ashleydw / Thinkle_Cron
Created June 11, 2011 21:44
Uploading backup archives via CLI to Google Docs
<?php
/**
* A simple cron to get the newest .tar.gz file from a backup folder and upload to Google Docs.
*
* @version 1
* @author Ashley White, http://www.needathinkle.com/
* @license http://creativecommons.org/licenses/by-sa/3.0/
*/
@ashleydw
ashleydw / Thinkle_Service_SongKick_Venue
Created July 6, 2011 10:49
Scrape SongKick venue page for events with Zend Framework
<?php
/**
* @version 1
* @author Ashley White, http://www.needathinkle.com/
* @license http://creativecommons.org/licenses/by-sa/3.0/
*/
final class Thinkle_Service_SongKick_Venue {
const VENUE_URI = 'http://www.songkick.com/venues/%d/calendar';
@ashleydw
ashleydw / MailChimp_AddEntries
Created July 13, 2011 12:25
Add entries from a tab separated list to MailChimp
<?php
/**
* @version 1
* @author Ashley White, http://www.needathinkle.com/
* @license http://creativecommons.org/licenses/by-sa/3.0/
*/
require 'mailchimp/MCAPI.class.php';
include 'krumo/class.krumo.php';
@ashleydw
ashleydw / PostProcess.php
Created October 18, 2011 09:04
Zend Framework Controller Plugin to allow post output processing
<?php
/**
* Zend Framework Controller Plugin to allow post output processing
*
* @version 1
* @author Ashley White, http://www.needathinkle.com/
* @license http://creativecommons.org/licenses/by-sa/3.0/
*/
final class Thinkle_Controller_Plugin_PostProcess extends Zend_Controller_Plugin_Abstract {
@ashleydw
ashleydw / Cascading.php
Created October 31, 2011 13:53
Cascading module directory file structure for Zend Framework
<?php
/**
* Cascading module directory file structure
*
* @version 1
* @author Ashley White, www.needathinkle.com
* @license @license http://creativecommons.org/licenses/by-sa/3.0/
*/
@ashleydw
ashleydw / ThinkleScroller.js
Created November 2, 2011 22:46
Create pretty scrolling divs with Mootools
/**
* Pretty scrolling divs for mootools.
*
* Use:
* new ScrollBar(el);
*
* @link www.needathinkle.com/tumblr/12258839049
* @version 2
* @author Ashley White, www.needathinkle.com
* @license @license http://creativecommons.org/licenses/by-sa/3.0/
@ashleydw
ashleydw / CSS3_MediaQueries.css
Created February 21, 2012 14:28
CSS 3 Inline Media Queries
/* mobile (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
}
/* mobile (landscape) ----------- */
@media only screen and (min-width : 321px) {
}
@ashleydw
ashleydw / ThinklePaginator.js
Last active October 1, 2015 03:18
Thinkle Mootools Paginator
/**
* Paginating through elements with MooTools
*
* Use:
* new ThinklePaginator(el, options);
*
* @link www.needathinkle.com/tumblr/18254885740
* @version 2
* @author Ashley White, www.needathinkle.com
* @license @license http://creativecommons.org/licenses/by-sa/3.0/
@ashleydw
ashleydw / scrape.js
Created April 16, 2014 19:15
Scraping with phantomjs
var urls = ['put', 'your', 'page', 'urls', 'here'];
page.onConsoleMessage = function (msg) {
if(msg.indexOf('SCRAPE-RESULT:') >= 0) {
var fn = 'file_name_to_write_to.txt';
console.log('writing file', fn)
fs.write(fn, msg.replace('SCRAPE-RESULT:', ''), 'w');
}
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "#636363",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 60%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#ed444f",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",