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 Blogger Hatena Syntax | |
// @namespace http://d.hatena.ne.jp/edvakf/ | |
// @description Hatena syntax and code highlight for blogger | |
// @include http://www.blogger.com/post-create.g* | |
// @include http://www.blogger.com/post-edit.g* | |
// ==/UserScript== | |
// | |
// Copyright (C) 2010 edvakf | |
// |
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
# -*- coding: utf-8 -*- | |
class Money | |
def initialize amount = 0 | |
@amount = amount | |
end | |
def to_i | |
@amount | |
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
let s:Presentation = { 'slides' : [], 'current' : 0, 'max' : 0 } | |
function! s:Presentation.load() | |
let self.slides = [ | |
\ { | |
\ 'title' : 'karaage.vim', | |
\ 'contents' : [ | |
\ '* vimrc晒しとカーソル移動系コマンド紹介', | |
\ '* 2011/07/10', | |
\ '* @akitsukada', |
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
let s:Presentation = { 'slides' : [], 'current' : 0, 'max' : 0 } | |
function! s:Presentation.load() | |
let self.slides = [ | |
\ { | |
\ 'title' : 'Apurenthisu', | |
\ 'contents' : [ | |
\ '* いつまで見習ってるつもりですか', | |
\ '* 2011/07/10', | |
\ '* @akitsukada', |
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 | |
# -*- coding:UTF-8 -*- | |
def parse(suite) | |
realpath = File::expand_path suite | |
if !File.exists?(realpath) | |
puts '与えられたsuiteファイルは存在しません' | |
puts '=>[' + realpath + ']' |
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 | |
# -*- coding: utf-8 -*- | |
require 'active_record' | |
require 'pp' | |
require 'cgi' | |
class Configs# {{{ | |
attr_reader :table_prefix, :db_adapter, :db_host, |
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
/** | |
* よくある Segue のサンプルコード | |
*/ | |
- (void)hoge { | |
// Storyboard で設定した Segue を文字列で指定して実行 | |
[self performSegueWithIdentifier:@"next" sender:self]; | |
} | |
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender |
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
// 文字列で Storyboard ID を指定 | |
MyViewController *viewController | |
= [storyboard | |
instantiateViewControllerWithIdentifier:@"MyViewController"]; |
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 MyClass() <UIAlertViewDelegate> | |
@end | |
@implementation MyClass | |
- (void) hoge | |
{ | |
UIAlertView *alert = [[UIAlertView alloc] init]; | |
alert.delegate = self; | |
alert.title = @"タイトル"; |
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
- (void) hoge | |
{ | |
SuperAlertView *alertView = [SuperAlertView alertViewWithTitle:@"タイトル" | |
message:@"メッセージ"]; | |
[alertView addButtonWithLabel:@"OK" | |
onTapped:^(void){ | |
NSLog(@"OK"); | |
}]; | |
[alertView addCancelButtonWithLabel:@"CANCEL" | |
onTapped:^(void){ |
OlderNewer