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
- (void)drawBevelArea | |
{ | |
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGRect frame = self.frame; | |
CGRect bevelAreaRect = CGRectMake(0, 0, frame.size.width, frame.size.height); | |
UIBezierPath* bevelAreaPath = [UIBezierPath bezierPathWithRoundedRect:bevelAreaRect cornerRadius:_cornerRadius]; | |
[_bevelBackgroundColor setFill]; |
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
on run {input, parameters} | |
tell application "System Events" | |
set activeApp to name of first process whose frontmost is true | |
end tell | |
set _timestamp to (input as string) | |
tell application activeApp | |
set realDate to ((do shell script "date -r " & _timestamp) as string) |
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
static inline double radians (double degrees) {return degrees * M_PI/180;} | |
CGImageRef CreateRotatedImage(CGImageRef imageRef, UIImageOrientation orientation) | |
{ | |
CGRect bnds = CGRectZero; | |
CGImageRef copy = nil; | |
CGContextRef ctxt = nil; | |
CGRect rect = CGRectZero; | |
CGAffineTransform tran = CGAffineTransformIdentity; |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'net/http' | |
# Patterns | |
patterns = {} | |
# Load first page | |
doc = Nokogiri::HTML(open('http://pttrns.com/')) |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'net/http' | |
# Patterns | |
patterns = {} | |
# Load first page | |
doc = Nokogiri::HTML(open('http://www.mobile-patterns.com/')) |
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
# | |
# Vision of how Diesel works | |
# | |
# Initialize engine from singleton | |
game = D.Game.get | |
title: "Chain Reaction Game v1.0" | |
container: document.querySelector('#game') | |
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
# | |
# Vision of how Diesel works | |
# | |
# Initialize engine from singleton | |
game = DGame.get | |
title: "Chain Reaction Game v1.0" | |
container: document.querySelector('body') | |
class DemoState extends DGameState |
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
// Available coordinates for article text display | |
CGFloat textDisplayStartX = self.photoView.frame.origin.x + self.photoView.frame.size.width + 10.0; | |
CGFloat textDisplayWidth = self.frame.size.width - textDisplayStartX - 5.0; | |
// Line heights | |
CGFloat titleLabelLineHeight = self.articleTitleLabel.font.lineHeight; | |
CGFloat detailLabelLineHeight = self.articleDetailsLabel.font.lineHeight; | |
CGFloat previewLabelLineHeight = self.articlePreviewLabel.font.lineHeight; | |
// Calculate title label size to determine whether to show the other labels or not |
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
# Moments splash page | |
# (c) momentsapp.com | |
jQuery -> | |
# Set up elements required | |
$container = $('#canvas') | |
# Set up raphael and the moments circles | |
paper = new Raphael( |
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
#sitecontainer{background:0}#body{background:rgba(0,0,0,.8)}#viewprevnexttop table td a,.viewprevnext table td a{color:#fff!important;text-shadow:none}.sharebutton,.sharebutton a{border-radius:5px}#linkinfo{color:#fff}#linkdatacontainer a{color:#26a5f9}.addthis_button{display:none}.tag_suggestion{display:inline-block;margin:5px;color:#fff}#newtagsuggestioninput{padding:5px!important}h1.line{border:0;color:#fff}.list_comments table tr td.tools{border:0!important}.list_comments .content .comment_content{color:#fff!important}.list_comments td.author .user em{color:#555}.list_comments td.author .user b{color:#fff}.list_comments table tr td.tools a:hover{color:#fff}.list_comments table tr td.author_photo,.list_comments table tr td.author_photo img{border-radius:5px}.list_comments table tr td.content .quote{border:0}#viewbody{background:0}#header2012-main{background:0;text-shadow:none}#header2012-main ul li,#header2012-main ul li a{background:0;border:0;color:#fff!important;text-shadow:1px 1px 2px #000}#header2012- |