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
#import <Foundation/Foundation.h> | |
#import "CommonCrypto/CommonDigest.h" | |
@interface NSString (MD5) | |
- (NSString *) MD5String; | |
@end | |
@implementation NSString (MD5) |
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
// ==UserScript== | |
// @name Deny Rakuten News | |
// @namespace http://espion.just-size.jp/archives/05/136155838.html | |
// @description Deny Rakuten News | |
// @include https://*.step.rakuten.co.jp/* | |
// @include https://*.travel.rakuten.co.jp/rsv/RsvInput.do* | |
// @include https://my.rental.rakuten.co.jp/action/my/* | |
// @include https://delivery.rakuten.co.jp/*?module=Default&action=OrderStep* | |
// @include https://auction.item.rms.rakuten.co.jp/* | |
// @include https://my.checkout.rakuten.co.jp/myc/purchase/Confirm |
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
#! /usr/bin/env ruby | |
require 'rubygems' | |
require 'extexif' | |
require 'optparse' | |
def main | |
simulation = nil | |
quiet = nil | |
help = nil |
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
@interface UIImage (shadow) | |
+ (UIImage *) imageWithContentsOfFile:(NSString *)path withShadow:(BOOL)shadow; | |
@end | |
@implementation UIImage (shadow) | |
+ (UIImage *) imageWithContentsOfFile:(NSString *)path withShadow:(BOOL)shadow { | |
UIImage *image = [UIImage imageWithContentsOfFile:path]; |
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
// ==UserScript== | |
// @name iTC time zone | |
// @namespace http://iphone-dev.g.hatena.ne.jp/ktakayama/ | |
// @description iTC time zone | |
// @include https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wo/* | |
// ==/UserScript== | |
(function() { | |
var path = "//div[@class='versionStateHistory-col-0']/p"; | |
var nodes = document.evaluate( |
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 *) screenImage:(UIView *)view rect:(CGRect)rect { | |
CGPoint pt = rect.origin; | |
UIImage *screenImage; | |
UIGraphicsBeginImageContext(rect.size); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextConcatCTM(context, CGAffineTransformMakeTranslation(-(int)pt.x, -(int)pt.y)); | |
[view.layer renderInContext:context]; | |
screenImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
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
@interface SampleView : UIView { | |
UIWebView *html; | |
} | |
@property (assign) UIWebView *html; | |
@end | |
@implementation SampleView |
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
+ (BOOL) hasExt:(NSString *)ext { | |
NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"check.%@", ext]]; | |
UIDocumentInteractionController *doc = | |
[UIDocumentInteractionController interactionControllerWithURL:url]; | |
BOOL success = [doc presentOptionsMenuFromRect:CGRectZero inView:[UIApplication sharedApplication].keyWindow animated:NO]; | |
if(success) [doc dismissMenuAnimated:NO]; | |
return success; | |
} |
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
@interface NSScrollView (swipe) | |
- (void) scrollToTop; | |
- (void) scrollToBottom; | |
@end | |
static const CGFloat kSwipeGestureUp = 1.0; | |
static const CGFloat kSwipeGestureDown = -1.0; | |
@implementation NSScrollView (swipe) |
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
#!/usr/bin/ruby | |
# -*- coding: utf-8; -*- | |
# | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
puts "魔王「この我のものとなれ、勇者よ」勇者「断る!」" | |
puts "橙乃ままれ" | |
puts "\n\n" |
OlderNewer