Skip to content

Instantly share code, notes, and snippets.

@yconst
yconst / NSArray+Statistics.h
Last active November 10, 2020 10:41 — forked from justinmstuart/NSArray+Statistics.m
Basic statistics for NSArrays
@interface NSArray (Statistics)
- (NSNumber *)calculateStat:(NSString *)stat;
- (NSNumber *)sum;
- (NSNumber *)mean;
- (NSNumber *)min;
@yconst
yconst / plugin.ndxz_bloggerc.php
Created October 1, 2011 16:36
Blogger feed retrieval plugin with MySQL caching for the Indexhibit CMS.
<?php if (!defined('SITE')) exit('No direct script access allowed');
/**
* Cached Blogger Feed Retriever for Indexhibit
* Copyright (c) 2010, Yiannis Chatzikonstantinou (yconst)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
@yconst
yconst / gist:964345
Created May 10, 2011 12:00 — forked from paulirish/README.md
imagesLoaded() jquery plugin
// $('img.photo',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.