Skip to content

Instantly share code, notes, and snippets.

View dealforest's full-sized avatar

Toshihiro Morimoto dealforest

View GitHub Profile
@lukeredpath
lukeredpath / LRPopoverManager.h
Created May 24, 2010 16:28
Singleton popover manager to enforce the one popover at at time rule. MIT license, help yourself
//
// LRPopoverManager.h
// Spark
//
// Created by Luke Redpath on 24/05/2010.
// Copyright 2010 LJR Software Limited. All rights reserved.
//
#import <Foundation/Foundation.h>
@novi
novi / CocoaDesignPattern-Summary.md
Created February 15, 2011 17:54
Cocoaのデザインパターンまとめ
  • Singleton
  • Abstract Factory - |NSWindow| (Theme, Style)
  • Builder - WebKit Document Representation
  • Prototype - |NSCollectionViewItem|, Cell
  • FactoryMethod - |NSDocument|, ClassCluster
  • Adapter - Delegate, CocoaBinding
  • Bridge - |NSImageRep|, Wrapper
  • Composite - View Hierarchy, Tree
  • Decorator - |NSBox|, |NSScrollView|
  • Facade - |NSTextView|
@gonecoding
gonecoding / Readme.markdown
Created February 22, 2011 12:42
Adding methods to NSData and NSString using categories to provide AES256 encryption on iOS

Important notice

I took down this Gist due to concerns about the security of the encryption/decryption part of this code (see comments below).

Rob Napier (@rnapier) has created a publicly available class that provides similar AES encryption/decryption functionality at https://github.com/rnapier/RNCryptor.

@akisute
akisute / UIWebView+Additions.h
Created February 27, 2011 15:32
UIWebView addition to enable/disable scrolling
#import <UIKit/UIKit.h>
@interface UIWebView (Additions)
/*!
@abstract Enable/Disable the receiver from scrolling.
*/
@property (nonatomic, assign) BOOL webViewScrollEnabled;
@akisute
akisute / UIApplication+UIID.h
Created August 22, 2011 01:16
Unique Installation Identifier (UIID) as a replacement of the depreciated UDID. Repository available here: https://github.com/akisute/UIApplication-UIID
//
// UIApplication+UIID.h
// UIID
//
// Created by akisute on 11/08/22.
//
#import <UIKit/UIKit.h>
# 絵文字キーボードの、各カテゴリーについて、全ページの絵文字を入力してサーバで受け取ってダンプした
各ページのレイアウトに対応して以下に表示した
before: utf8::decode(Ark::Plugin::Encoding::Unicode) -> sprintf("%#x", ord($_))
after: utf8::decode(Ark::Plugin::Encoding::Unicode) -> encode('utf8') -> decode('x-utf8-e4u-unicode') -> encode('x-utf8-e4u-softbank3g') -> decode('utf8') -> sprintf("%#x", ord($_))
Encode::JP::Emoji version 0.60
!!!国旗の最後が抜けてる!!!
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@mala
mala / gist:5882869
Created June 28, 2013 06:30
htn.to デフォルトリダイレクト先変更に寄せて

もう皆すっかり忘れてると思うんだけど、2009年ごろに特定の検索エンジン(具体的にはGoogleね)が、 URLの中にURLが入ってるようなのを一律検索結果から除外するといったことがあった。

既存のURLをパラメータとして受け取って、際限なくコンテンツ生成するようなものは、Googleの検索結果から除外されることになった。 (キャッシュとか変換とか翻訳とかそういうのは自主的にrobots.txtやmetaタグで検索結果から除外されるようにすべきだと思う)

ソーシャルブックマークの場合は、単に変換したり翻訳したりしているわけではなく、付加的な情報があるわけだけど そんなことをわざわざGoogleが特別扱いはしなかった。単にURLの中にURLが入ってるものは除外された。

@jiro
jiro / gist:5989320
Created July 13, 2013 03:41
iOctocatから学ぶiOSアプリ開発手法 (発表メモ)
@azu
azu / Podfile
Created August 27, 2013 06:32
CocoaPods経由で入れたMagicalRecordのログを非表示にするPodfileの書き方
platform :ios, '5.0'
pod 'MagicalRecord'
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |config|
s = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS']
if s==nil then s = [ '$(inherited)' ] end
s.push('MR_ENABLE_ACTIVE_RECORD_LOGGING=0');