Skip to content

Instantly share code, notes, and snippets.

View gongo's full-sized avatar

Wataru MIYAGUNI gongo

View GitHub Profile
@gongo
gongo / libfreenect.rb
Created November 23, 2010 11:04
OpenKinect/libfreenect commit f3a8e29a08d536ba1e3f82b257f6071a998f26ad で変更されたけど微妙に動かなかったので修正
require 'formula'
class Libfreenect <Formula
url 'https://github.com/OpenKinect/libfreenect/tarball/master'
version 'master'
homepage 'http://openkinect.org'
md5 ''
depends_on 'libusb-freenect'
depends_on 'cmake'
13:48 (yonobot) だからキャバクラいけよ
13:50 (Tomohiro) えー QT @yonobot: だからキャバクラいけよ
13:51 (yonobot) @Tomohiro 悲しいですね。

本体やパッチのダウンロード、パッチ適用までのスクリプト

#!/bin/sh

VERSION=2.6.37
PATCH_URI="http://sheeva.with-linux.com/sheeva/$VERSION"

echo "Download kernel source"
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-$VERSION.tar.bz2
tar jxf linux-$VERSION.tar.bz2
@gongo
gongo / gist:787957
Created January 20, 2011 14:27
2年3ヶ月前の漫画リスト。この時点で確か1750冊ぐらい。今何冊ぐらいいってるかな。
(完結) -- 「全」と書いてないやつはまだ集め終わってない
藍より青し 1〜7、9〜13巻
あきら翔ぶ!! 全19巻
GUT's 全17巻
彼氏彼女の事情 全21巻
神撫手 全2巻
機動新世紀ガンダムX -UNDER THE MOONLIGHT- 全4巻
機動戦士ガンダムSEED ASTRAY 全3巻
機動戦士ガンダムSEED XASTRYA 全2巻
機動戦士ガンダムSEED DESTINY ASTRAY 全4巻
@gongo
gongo / gist:798145
Created January 27, 2011 06:13
Symbol's function definition is void: cfw:contents-add の時の trace log
Debugger entered--Lisp error: (void-function cfw:contents-add)
cfw:contents-add((1 31 2011) "hoge!" nil)
cfw:howm-schedule-period-to-calendar((1 1 2011) (1 31 2011))
cfw:contents-merge((1 1 2011) (1 31 2011))
cfw:model-month-create(1 2011)
cfw:calendar-update([cl-struct-cfw:dest region nil #<buffer *howmM:%menu%*> (lambda (&rest --cl-rest--) (apply #[... "\301^HJ!\207" [G30508 marker-position$
cfw:insert-calendar-region(nil nil 10 (keymap (13 . cfw:howm-from-calendar) keymap (116 . cfw:navi-goto-today-command) (103 . cfw:navi-goto-date-command) ($
cfw:howm-schedule-inline()
apply(cfw:howm-schedule-inline nil)
howm-menu-here-func(cfw:howm-schedule-inline nil 273 305)

記録:Kたくさん

変数とは

  • 定数、引数
  • グローバル

変数と定数の違いはなんですか?

まずは定数

/**
* Fizz Buzz
*
* @link http://www.codeeval.com/open_challenges/1/
* @license MAHALO License (https://github.com/gongo/Tython/blob/master/LICENSE)
* @example
*
* 1. input file
*
* gongo% cat input.txt
@gongo
gongo / forever.c
Created June 20, 2011 00:59
永遠の愛
#define forever for (;;)
int main(int argc, char** argv)
{
int LOVE = 0;
forever { LOVE++; }
return 0;
}

test case

titleform1form2form3
ゴンゴ
ゴンゴゴンゴ
ゴンゴゴンゴ
ゴンゴゴンゴ
ゴンゴゴンゴゴンゴ
ハゴーゴンゴゴンゴ
ハゴーゴンゴ
@gongo
gongo / permutation.php
Created June 22, 2011 13:43
Ruby の Array#permutation のソースコード読んで PHP で書いてみた
<?php
/**
* Ruby の Array#permutation をパクるとこんな感じ
*
* % php -v
* PHP 5.3.4 (cli) (built: Dec 15 2010 12:15:07)
* Copyright (c) 1997-2010 The PHP Group
* Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
*/