Skip to content

Instantly share code, notes, and snippets.

View takaokouji's full-sized avatar

Kouji Takao takaokouji

View GitHub Profile
@takaokouji
takaokouji / load.c.patch
Created October 11, 2011 14:04
MacRuby requires <file>.rbo instead of <file>.rb when you write 'require "<file>.rb"' in your script and <file>.rbo was created recently
diff --git a/load.c b/load.c
index b070a12..bc00930 100644
--- a/load.c
+++ b/load.c
@@ -323,6 +323,15 @@ check_path(const char *path, VALUE *out, int *type)
// it's a valid one, then try to validate the path.
int t = 0;
if (strcmp(p + 1, "rb") == 0) {
+ if (rbo_enabled && strlen(path) < (PATH_MAX - 1)) {
+ char buf[PATH_MAX];
@takaokouji
takaokouji / AppDelegate_for_Calc.rb
Created January 31, 2012 11:37
MacRubyサンプルプログラム(AppDelegate.rb) - 第53回 Ruby/Rails勉強会@関西 MacRubyではじめる!Macアプリ開発入門
#
# AppDelegate.rb
# Calc
#
# Created by 高尾 宏治 on 12/01/27.
# Copyright 2012 TAKAO Kouji. All rights reserved.
#
class AppDelegate < NSWindowController
attr_accessor :window
#############################
#! Is colorful terminal ?
export COLOR_P
if [ "$TERM" = "dumb" -o "$TERM" = "emacs" -o "$TERM" = "putty" ]; then
COLOR_P="nil"
else # color
COLOR_P="t"
fi
(when (>= emacs-major-version 23)
(set-face-attribute 'default nil
:family "monaco"
:height 120)
(set-fontset-font
(frame-parameter nil 'font)
'japanese-jisx0208
'("Hiragino Maru Gothic Pro" . "iso10646-1"))
(set-fontset-font
(frame-parameter nil 'font)
#!/usr/bin/env bash
# repository
EPEL=epel-release-6-8.noarch
rpm -q $EPEL
if [ $? -eq 1 ]; then
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/$EPEL.rpm
rpm -Uvh $EPEL.rpm
fi
#!/usr/bin/env bash
# system update
yum -y update
yum -y install SDL-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel ipa-gothic-fonts.noarch ipa-mincho-fonts.noarch ipa-pgothic-fonts.noarch ipa-pmincho-fonts.noarch
# SGE
if [ ! -e /usr/lib/libSGE.so ]; then
cd /usr/local/src
if [ ! -e sge030809 ]; then
#!/usr/bin/env bash
# repository
EPEL=epel-release-6-8.noarch
rpm -q $EPEL
if [ $? -eq 1 ]; then
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/$EPEL.rpm
rpm -Uvh $EPEL.rpm
fi
@takaokouji
takaokouji / rj05.sh
Last active January 2, 2016 21:49
Ruby.Jr第5回のセットアップスクリプト
gem install smalruby smalruby-editor
rbenv rehash
@takaokouji
takaokouji / smalruby_dpkg_l.log
Created April 26, 2014 06:09
Raspberry Pi/Smalruby dpkg -l
要望=(U)不明/(I)インストール/(R)削除/(P)完全削除/(H)保持
| 状態=(N)無/(I)インストール済/(C)設定/(U)展開/(F)設定失敗/(H)半インストール/(W)トリガ待ち/(T)トリガ保留
|/ エラー?=(空欄)無/(R)要再インストール (状態,エラーの大文字=異常)
||/ 名前 バージョン アーキテクチャ 説明
+++-=====================================================================-=======================================-=======================================-===============================================================================================================================================
ii adduser 3.113+nmu3 all add and remove users and groups
ii alsa-base 1.0.25+3~deb7u1 all ALSA driver configuration files
ii alsa-utils
@takaokouji
takaokouji / dot.spacemacs.el
Last active December 14, 2016 05:17
My .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory