Skip to content

Instantly share code, notes, and snippets.

@novi
novi / gist:1486262
Created December 16, 2011 14:34
オレオレUIViewコーディングガイドライン

UIViewコーディングガイドライン

基本はコーディングガイドラインに沿う。

つまり、親クラス: コーディングガイドライン

クラス構造と階層モデル

  • 必要に応じてViewの内部で保有関係を階層化する
  • 一番親のView(Controllerと直接やりとりするView)でのControllerへのメッセージ送信にはデリゲートモデルを使う
@novi
novi / gist:1486247
Created December 16, 2011 14:31
オレオレCocoaコーディングガイドライン
@novi
novi / swift-arm-on-archlinux-rpi2.md
Last active February 8, 2017 04:11
Install Swift ARM on ArchLinux(Raspberry Pi2)

Install debootstrap.

# pacman -S arch-install-scripts debootstrap

Install Debian base system into $ROOTFS.

$ export ROOTFS=$HOME/rootfs
@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|
@novi
novi / pdfwalker.on.Mac.txt
Created June 17, 2011 15:56
PDFWalkerインストール on Mac OS X 10.6.7
* brew install libtiff
* brew install gtk+
** gtk+のインストールに失敗するときは、 https://twitter.com/novi_/status/81740297842868225
** /usr/local/lib/libintl.dylibが無いときは、 https://twitter.com/novi_/status/81742895941558272
* gem install origami gtk2
* mkdir -p ~/.local/share
** pdfwalkerが起動しないとkは、 /Library/Ruby/Gems/1.8/gems/origami-1.0.3/bin/pdfwalker:3 RUBY_VERSION を1.8以上にする
@novi
novi / cmysqlmariadb.rb
Created July 3, 2018 07:15
Homebrew Formula for cmysql-mariadb
$version = "2.1.0"
$hash = "3c8402e3cd8d0690638c41afd35ae1ee4fc9e3cd5b7010a39a917630333c40ae"
class Cmysqlmariadb < Formula
homepage "https://github.com/novi"
url "https://github.com/novi/cmysql-mariadb/archive/#{$version}.tar.gz"
sha256 $hash
version $version
depends_on "pkg-config"
@novi
novi / swift-on-arch-linux.md
Last active July 13, 2018 07:09
Swift on Arch Linux

Install debootstrap.

# pacman -S arch-install-scripts debootstrap

Install Ubuntu base system into $ROOTFS.

$ export ROOTFS=$HOME/rootfs
@novi
novi / logger.js
Created February 14, 2012 20:27
node-http-proxyを使ったいわゆるバーチャルホスト対応Webサーバー(WebSocket対応版)
var http = require('http'),
httpProxy = require('http-proxy'),
logger = require('./logger');
// localhost:8001 に普通のExpressアプリ -> http://test.nov1.jp/
// localhost:8002 にWebSocketを使ったExpressアプリ -> http://😄.nov1.jp/, http://chat.nov1.jp/
// Proxy for Chat app
var proxy = new httpProxy.HttpProxy({
target: {
$version = "2.0.5"
$hash = "4cb9620fbb68571be11ba13afc8911fd434561b9ff661040a128618af19bbbb5"
class Cmysql < Formula
homepage "https://github.com/novi"
url "https://github.com/novi/cmysql/archive/#{$version}.tar.gz"
sha256 $hash
version $version
depends_on "pkg-config"
@novi
novi / gist:1805373
Created February 12, 2012 00:43
Node.js 開発環境 基礎

Node.js 開発環境 基礎

Node.jsのインストール

OS X ならHomebrewまたはMacportsで。

[~] $ brew install node
[~] # port install node

nodeコマンドでnodeのインタプリタを起動。