Skip to content

Instantly share code, notes, and snippets.

@shimizukawa
shimizukawa / 201723133-Billing-FAQ.rst
Last active August 16, 2018 02:13
【Slack FAQ 翻訳】 2014/6/23 支払いFAQ - Billing FAQ - Slack Help Center
@japboy
japboy / oculus-rift-notes.md
Last active August 14, 2017 18:44
Oculus Rift について。

Oculus Rift メモ

概要

2012 年 8 月に Kickstarter 上で立ち上げられたプロジェクト。新しいゲーム用バーチャルリアリティ (VR) ヘッドセットとして高い注目を集め、同年 9 月に 250,000 USD 資金調達目標を大きく上回る 2,437,429 USD の資金調達に成功し、プロジェクトのスタートを切る。

同種のデバイスとしては Sony のヘッドマウントディスプレイ (HMD) である HMZ シリーズなどが考えられるだろうが、Oculus Rift はこれをはるかにしのぐ機能と性能を兼ね備えている。

@codingjester
codingjester / xauth.py
Created October 19, 2011 15:59
Using XAuth for Tumblr
#!/usr/bin/env python
import urllib
import urlparse
import oauth2 as oauth
@codelynx
codelynx / CoreGraphics+Z.swift
Last active November 28, 2016 04:28
CoreGraphics Geometric Utilities [Swift 3.0]
//
// GeoUtils.swift
// ZKit
//
// The MIT License (MIT)
//
// Copyright (c) 2016 Electricwoods LLC, Kaz Yoshikawa.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@yoshimin
yoshimin / gist:858d14751fc1c00807d2
Created August 10, 2014 17:06
NSAttributedStringを使ってリンク文字を作る
#import "YMNViewController.h"
NSString *const Text = @"The iOS Developer Program provides a complete and integrated process for developing and distributing iOS apps on the App Store. Learn more";
NSString *const LinkText = @"Learn more";
@interface YMNViewController ()
@property (nonatomic, strong) UITextView *textView;
@property (nonatomic, strong) UITapGestureRecognizer *tapGesture;
@ryugoo
ryugoo / iOS7Yahoo.md
Created October 7, 2013 12:40
iOS 7 エンジニア勉強会 @yahoo - 2013/10/07
  • Yahoo! 株式会社
  • 2013/10/07
  • 資料は後ほどシェア

iOS 7 でアプリ開発はどう変わる (佐野さん)

  • iOS 7 のデザイン原則
    • UI はコンテンツに従順 * Safari が分かりやすい
  • ナビゲーションバーが殆ど消える
@indragiek
indragiek / gist:5200264
Created March 19, 2013 21:23
Easy Core Data fetching/inserting
- (void)fetchWithRequest:(NSFetchRequest *)request
completion:(void(^)(NSArray *results, NSError *error))handler
{
[request setResultType:NSManagedObjectIDResultType];
void (^executeHandler)(NSArray *, NSError *) = ^(NSArray *results, NSError *error){
dispatch_async(dispatch_get_main_queue(), ^{
if (handler) handler(results, error);
});
};
[self.backgroundContext performBlock:^{

詳細はWiki

https://github.com/allending/Kiwi/wiki

はまったところ

  • 全てオブジェクトである必要がある。
  • intなどはtheValue()でラップする必要がある。
  • should receiveはテストするメソッド実行前に書いておく必要がある。
  • should equalなどの実行結果の確認はテストするメソッド実行後に書いておく必要がある。
@dcastro
dcastro / gist:2835703
Created May 30, 2012 11:36
iOS 3 types of crossfade animations
[UIView animateWithDuration:0.3 animations:^() {
self.commentContentLabel.alpha = (editing)? 0.0 : 1.0;
}];
////////////////
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.commentContentLabel cache:YES];
@yoshimin
yoshimin / gist:81f7cbc22050b7e83e29
Created August 10, 2014 16:09
CoreTextで描画した文字をリンカブルにする(タップされたら文字をハイライトさせる)
#import "YMNCoreTextView.h"
#import <CoreText/CoreText.h>
#import <QuartzCore/QuartzCore.h>
@interface YMNCoreTextView()
@property (nonatomic, strong) NSMutableAttributedString *attributedString;
@property (nonatomic, assign) CTFrameRef drawingFrame;
@property (nonatomic, assign) NSRange linkableWordRange;