Skip to content

Instantly share code, notes, and snippets.

@novi
novi / gist:3103024
Created July 13, 2012 06:04
Arch Linux ARM on Beagle Bone

公式通りにインストールすればよいが、カーネルイメージが壊れているのか正しく起動できないので、今回は別のカーネルを使ってみた。(rootfsのイメージは公式のものでOK。)

下準備

以下SDカードを /dev/sdb

# fdisk /dev/sdb
/dev/sdb1 : 128MB, type 0e, アクティブフラグ
/dev/sdb2 : 残り, type Linux

でパーティションを作成。

@novi
novi / gist:2329413
Created April 7, 2012 14:37
新しいさくらのVPS(v3, 2G)にArchLinuxをインストール
@novi
novi / gist:1868389
Created February 20, 2012 08:19
オレオレJavaScriptコーディングガイドライン (Node.js+クライアント)

クライアント(Webブラウザ)側とサーバー側両方のJavaScriptについて。

c.f. ECMAScript 5

@novi
novi / gist:1803875
Created February 11, 2012 19:57
Bundlerを使ってプロジェクトごとにGemを管理する
@novi
novi / gist:1682639
Created January 26, 2012 12:53
TeX関連 on Arch Linux

インストール

dvipdfmx

  • フォントを埋め込まない $ dvipdfmx -f ptex-noEmbed.map -f utf-noEmbed.map -f otf-noEmbed.map hoge.dvi
  • updmapでMapファイルを更新
@novi
novi / gist:1486278
Created December 16, 2011 14:37
オレオレUIViewControllerコーディングガイドライン
@novi
novi / test.m
Created May 28, 2011 16:34
CGRectIntegralの謎
-(void)testRect
{
CGRect r = CGRectMake(1.222, 1.3333, 1, 1.000);
NSLog(@"%@", NSStringFromCGRect(r));
NSLog(@"%@", NSStringFromCGRect(CGRectIntegral(r)));
NSLog(@"%@", NSStringFromCGRect(CGRectMake(floorf(r.origin.x), floorf(r.origin.y), floorf(r.size.width), floorf(r.size.height))));
NSLog(@"%@", NSStringFromCGRect(CGRectMake(ceilf(r.origin.x), ceilf(r.origin.y), ceilf(r.size.width), ceilf(r.size.height))));
STAssertTrue(CGRectEqualToRect(r, CGRectIntegral(r)), nil, nil);
}
@novi
novi / header.h
Created May 24, 2011 14:17
object-dummy1
typedef void* StringRef;
StringRef StringCreateWithCString(const char* cstr); // Stringを作成
StringRef StringCreateFromFile(const char* path); // ファイルから作成
int StringGetLength(StringRef str); // 文字列の長さを取得
float StringGetFloat(StringRef str); // 文字列から数値に変換
int StringGetInt(StringRef str);
@novi
novi / sample.pdf
Created April 27, 2011 14:26
日本語のサンプルPDF(手打ち) 一部Requiredオブジェクト無し
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@novi
novi / gist:939592
Created April 24, 2011 14:45
otool -o option
UIKit (architecture armv6):
Contents of (__DATA,__objc_classlist) section
0048edf4 0x4f5cb0
isa 0x4f5c9c
superclass 0x4f6020
cache 0x0
vtable 0x0
data 0x490274 (struct class_ro_t *)
flags 0x0
instanceStart 44