Skip to content

Instantly share code, notes, and snippets.

[self setRefreshTimer: [[CPTimer alloc] initWithFireDate: [CPDate dateWithTimeIntervalSinceNow:5]
interval:1
target: self
selector: @selector(refreshData:)
userInfo: nil
repeats: NO]];
[siteLoadingTitleSpinner bind:@"hidden" toObject:self withKeyPath:@"site.isLoading" options:
[CPDictionary dictionaryWithObject:[CPValueTransformer valueTransformerForName:CPNegateBooleanTransformerName]
forKey:@"CPValueTransformerBindingOption"]];
(in /Users/joe/Dropbox/Work/Cappuccino/AppKit/Themes/Aristo)
Building Aristo theme
Recording themed properties for CPButton.
Recording themed properties for CPButton.
Recording themed properties for CPButton.
Recording themed properties for CPPopUpButton.
Recording themed properties for CPPopUpButton.
Recording themed properties for CPScrollView.
Recording themed properties for CPScroller.
Recording themed properties for CPScroller.
var _gaq = nil;
var sharedGoogleAnalyticsAccount = nil;
@implementation GoogleAnalytics : CPObject
{
CPString account @accessors;
int sentEvents;
}
- (id)init
@implementation WPRRoundedRectangleDrawer : CPObject
{
CPArray backgroundColors @accessors;
CPArray corners @accessors;
int innerMargin @accessors;
id shadowSize @accessors;
int shadowBlur @accessors;
}
- (id)init
for (var i = 0; i < [data count]; i++)
{
var someNeedRefreshing = NO;
if( !data[i].is_refreshing )
{
console.log(i); // returns 4 (on 4th time)
var aSite = [self getSiteForSiteID:data[i].ID];
console.log( "updating site: " + data[i].nicename );
console.log(i); //returns 3
@joehoyle
joehoyle / 3.2 Release Notes
Created June 9, 2011 10:35 — forked from noeltock/3.2 Release Notes
New stuff from Theme Force
Framework (affects all themes)
Features
========
- Yelp Bar & Foursquare Widgets Added
- Accepted Payments Widget Added
- Opening Times Widget Added
- Google Maps Widget Added
- Single Event Pages Added
@joehoyle
joehoyle / WPPost.php
Created July 26, 2011 17:15
An Idea for a WordPress Post class
<?php
/**
* This is a take on making the Post object in WordPress a little more object-y. As well as wrapping
* some basic function like get_the_title(), it aims to treat references such as "post_parent"
* as full objects rather than IDs, making it possible to do $post->get_parent()->get_content().
*
* No caching has been added, but this would be trivial. Half written in pseudo-code and untested
*
*/
<?php
/*
* Author: Joe Hoyle
* URL: joehoyle.co.uk
* Contact: [email protected]
*/
// Add the command to the wp-cli, only if the plugin is loaded
if ( function_exists( 'wp_unit_add_pages' ) ) {
@joehoyle
joehoyle / default.vcl
Created November 30, 2011 13:11
WordPress VCL
backend default {
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv {
# set standard proxied ip header for getting original remote address
set req.http.X-Forwarded-For = client.ip;
if (req.request == "PURGE") {