Skip to content

Instantly share code, notes, and snippets.

View urouro's full-sized avatar

Kenta Nakai urouro

View GitHub Profile
@urouro
urouro / openssl コマンドで SHA256 の文字列を生成.md
Created September 12, 2014 11:37
openssl コマンドで SHA256 の文字列を生成.md
@urouro
urouro / gist:2772027e0bab099f38e1
Created September 12, 2014 11:27
NSString+ConvertDateFormat
NSDateFormatter *formatter = [NSDateFormatter new];
[formatter setDateFormat:@"yyyy-MM-dd"];
cell.textLabel.text = [[formatter dateFromString:master.date] stringValueWithFormat:@"yyyy.MM.dd”];
@urouro
urouro / .m
Created August 28, 2014 06:16
UITableView DataSource/Delegate
#pragma mark - UITableView DataSource/Delegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
@urouro
urouro / file0.m
Created May 6, 2014 12:07
複数のUITextFieldに同じプロパティを設定する ref: http://qiita.com/uro_uro_/items/007bb81e060efa77c818
self.firstField.delegate = self;
self.firstField.layer.borderWidth = 2;
self.firstField.layer.borderColor:[UIColor redColor].CGColor;
self.secondField.delegate = self;
self.secondField.layer.borderWidth = 2;
self.secondField.layer.borderColor:[UIColor redColor].CGColor;
// 以降続く...
@urouro
urouro / gist:b9db41480cadd480d894
Created May 6, 2014 01:53
git submodule 削除
git submodule deinit -f path
git config -f .gitmodules --remove-section submodule.path
@urouro
urouro / gist:10114613
Created April 8, 2014 12:01
Spec for Kiwi + MagicalRecord
#import "Kiwi.h"
#import "APMApp.h" // NSManagedObject subclass
#import <MagicalRecord/CoreData+MagicalRecord.h>
SPEC_BEGIN(APMAppSpec)
describe(@"APMApp", ^{
beforeAll(^{
[MagicalRecord setDefaultModelFromClass:[self class]];
[MagicalRecord setupCoreDataStackWithInMemoryStore];
@urouro
urouro / Brewfile
Last active August 29, 2015 13:58
Brewfile
# update homebrew
update
# upgrade already-installed packages
upgrade
# add repositories
tap homebrew/binary
tap homebrew/versions
@urouro
urouro / file0.txt
Created January 9, 2014 06:31
FMDatabase Code=7 "out of memory" ref: http://qiita.com/uro_uro_/items/3143651a815397e6adc5
NSString *sql = [NSString stringWithFormat:@"CREATE TABLE IF NOT EXISTS %@ ( \
item_id INTEGER PRIMARY KEY AUTOINCREMENT, \
title TEXT, \
on INTEGER, \
sort INTEGER, \
date DATETIME \
);", TABLE_NAME];
@urouro
urouro / .m
Created December 25, 2013 05:26
StoryboardからUIViewController呼び出してコードで画面遷移
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
<# Controller #> *controller = [storyboard instantiateViewControllerWithIdentifier:@"<# Identifier #>"];
@urouro
urouro / new_gist_file
Created December 20, 2013 08:37
ios mail
// .h
// #import <MessageUI/MessageUI.h>
// #import <MessageUI/MFMailComposeViewController.h>
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
//タイトル
[picker setSubject:title];