Skip to content

Instantly share code, notes, and snippets.

@Air-Craft
Air-Craft / Contract Killer 3.md
Created February 3, 2020 10:22 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@Air-Craft
Air-Craft / UICollectionViewFlowLayoutCenterItem.m
Last active August 29, 2015 14:04 — forked from mmick66/UICollectionViewFlowLayoutCenterItem.m
Make UICollectionViewFlowLayout handle page sizes that are less than the width. #ios #UICollectionView #scrolling #carousel
- (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity
{
// We're going to center the centermost item...
// Use the bounds to have the snap happen the minute drag stops. In other words use the current content offset (which = bounds.origin) instead of the proposed end offset (which takes velocity into account)
CGRect proposedRect = self.collectionView.bounds;
CGFloat proposedContentOffsetCenterX = proposedContentOffset.x + self.collectionView.bounds.size.width * 0.5f;
// Comment out if you want the collectionview simply stop at the center of an item while scrolling freely (ie take velocity into account)
@Air-Craft
Air-Craft / css_browser_selector.php
Created November 29, 2011 11:12
PHP CSS Browser Selector
<?php
/*
PHP CSS Browser Selector v0.0.2 (Update by Hari Karam Singh)
Bastian Allgeier (http://bastian-allgeier.de)
http://bastian-allgeier.de/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Credits: This is a php port from Rafael Lima's original Javascript CSS Browser Selector: http://rafael.adm.br/css_browser_selector
*/
@Air-Craft
Air-Craft / gist:1404442
Created November 29, 2011 11:11
PHP CSS Browser Selector
<?php
/*
PHP CSS Browser Selector v0.0.1
Bastian Allgeier (http://bastian-allgeier.de)
http://bastian-allgeier.de/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Credits: This is a php port from Rafael Lima's original Javascript CSS Browser Selector: http://rafael.adm.br/css_browser_selector
*/