This file contains 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
var round = function(value) { | |
return Math.round(value*100)/100; | |
}; | |
Raphael.fn.canvas2dArc = function(x, y, radius, aStartAngle, aEndAngle, anticlockwise) { | |
var startX, startY, endX, endY; | |
var fullCircle = 2 * Math.PI; | |
var startAngle = (anticlockwise || 0) ? aEndAngle : aStartAngle; | |
var endAngle = (anticlockwise || 0) ? Math.abs(fullCircle - aStartAngle) : aEndAngle; |
This file contains 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
window.animStartTime = (function(w) { | |
return w.animationStartTime || | |
w.webkitAnimationStartTime || | |
w.mozAnimationStartTime || | |
w.oAnimationStartTime || | |
w.msAnimationStartTime || | |
+new Date(); | |
})(window); |
This file contains 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
# encoding: utf-8 | |
import sublime, sublime_plugin | |
class DetectSpecialCharacters(sublime_plugin.EventListener): | |
def on_load(self, view): | |
sublime.status_message("detect_special_characters is active") | |
def on_modified(self, view): | |
# find no-break space | |
special_characters = view.find_all(u"\u00A0") |
This file contains 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
// UIImage+ColorOverlayCategory.h | |
// Created by Tobias Reiss, @basecode on 1/8/12. | |
#import <UIKit/UIKit.h> | |
@interface UIImage (ColorOverlayCategory) | |
- (UIImage*)imageWithColorOverlay:(UIColor*)colorOverlay; | |
@end |
This file contains 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
<svg style="border:1px solid #000;" width="240" height="200"> | |
<defs> | |
<symbol id="imageRef"> | |
<image xlink:href="http://www.howtocleanstuff.net/wp-content/uploads/boat.jpg" width="100%" height="100%" /> | |
</symbol> | |
<filter id="filterRef" height="10" width="10" x="-5" y="-5"> | |
<feGaussianBlur stdDeviation="1"></feGaussianBlur> | |
</filter> | |
</defs> | |
<!-- reuse image reference and apply a blur filter //--> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
// AVAudioPlayer+SpriteCategory.h | |
// Copyright (C) 2012 Tobias Reiss (MIT License) | |
#import <AVFoundation/AVFoundation.h> | |
@interface AVAudioPlayer (SpriteCategory) | |
- (void) playAt:(NSTimeInterval)aStartTime duration:(NSTimeInterval)aDuration; | |
- (void) playAt:(NSTimeInterval)aStartTime duration:(NSTimeInterval)aDuration completion:(void (^)(void))completionBlock; | |
- (void) completionCleanup:(NSTimer*)aTimer; |
This file contains 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
// class+constructor | |
var Lib = function() { | |
// instance variable | |
this.aVariable = 0; | |
// instance method | |
this.changeVariable = function(value) { | |
this.aVariable = value; | |
return this; | |
}; | |
} |
This file contains 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
// NSArray+Additions.h | |
// Copyright (c) 2012 Tobias Reiss (MIT License) | |
#import <Foundation/Foundation.h> | |
@interface NSArray (Additions) | |
+ (id)arrayWithObject:(id)object count:(NSUInteger)cnt; | |
@end |
This file contains 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
// UIImage+Additions.h | |
// Copyright (c) 2012 Tobias Reiss (MIT License) | |
#import <UIKit/UIKit.h> | |
@interface UIImage (Additions) | |
+ (UIImage *)deviceAgnosticImageNamed:(NSString *)name; | |
- (UIImage *)deviceAgnosticImageFromRect:(CGRect)frame; |
OlderNewer