Skip to content

Instantly share code, notes, and snippets.

@yurfuwa-chan
yurfuwa-chan / gist:3359646
Created August 15, 2012 12:16
LocalNotificationへの登録
- (void)viewDidLoad{
[super viewDidLoad];
//全notificationの解除
[[UIApplication sharedApplication] cancelAllLocalNotifications];
//notificationを登録
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:[self getDiffFromTodayWithFormat:@"201208152113"]];
[self registNotification:date message:@"時間になったよ"];
@yurfuwa-chan
yurfuwa-chan / gist:3317729
Created August 10, 2012 20:48
FDT:How Do I Export A Release Build?
-optimize=true
-omit-trace-statements=true
@protocol CoverManagerDelegate
-(void)didFinishComplete:(id)manager;
@optional
-(void)progressLoadCount:(int)count manager:(id)manager;
@end
@yurfuwa-chan
yurfuwa-chan / gist:3225801
Created August 1, 2012 11:02
ios ローカルディレクトリに保存
NSData *data = UIImagePNGRepresentation([self trimImage:screenImage :CGRectMake(0, 0, 320, 400)]);
NSString *filePath = [NSString stringWithFormat:@"%@/test.png" , [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]];
if ([data writeToFile:filePath atomically:YES]) {
NSLog(@"OK");
} else {
NSLog(@"Error");
}
#closeSign {
animation: swing ease-in-out 9s;
-webkit-animation: swing ease-in-out 9s;
-moz-animation: swing ease-in-out 9s;
-webkit-transform-origin: 50% 0%;
-moz-transform-origin: 50% 0% }
@-keyframes swing { 0% }
10% { -transform: rotate(-2deg) }
codestream API_KEY
@yurfuwa-chan
yurfuwa-chan / just.html
Created March 23, 2012 19:59
api.html5please.com
<div id="h5p-message"></div> <script>window.h5please=function(a){ document.getElementById("h5p-message").innerHTML=a.html }</script> <script async src="http://api.html5please.com/websockets.json?callback=h5please&texticon&html"></script>
@yurfuwa-chan
yurfuwa-chan / jquery.inputCheckbox.coffee
Created March 7, 2012 13:47
チェックボックスを自動で全部有効化したり解除したりするjquery plugin
class Module
@isInputElement:(el)->
el instanceof HTMLInputElement
@Module = Module
$.fn.extend
allChecked:()->
@each (i,el)=>
el.checked = true if Module.isInputElement(el)
@yurfuwa-chan
yurfuwa-chan / jquery.myplugin.coffee
Created March 7, 2012 12:18 — forked from jimeh/jquery.myplugin.coffee
Example jQuery plugin written in CoffeeScript, and the resulting compiled JavaScript file.
$.fn.extend
test:(options)->
self = $.fn.test
opts = $.extend {}, self.default_options, options
$.extend $.fn.test,
default_options:
version: '1.0'
@yurfuwa-chan
yurfuwa-chan / Array.js
Created March 2, 2012 13:06
IE7,8にArray.indexofがない件
if(!Array.prototype.indexOf){
Array.prototype.indexOf = function(obj){
var l = this.length;
if(l){
for(var i=0;i<l;i++){
if(this[i] === obj)return i
}
}
return -1
}