Skip to content

Instantly share code, notes, and snippets.

Avatar

Matsuki, Hidenori mazgi

View GitHub Profile
@mazgi
mazgi / NSInvocationSample.m
Created Mar 26, 2012
NSInvocationを使ってメッセージ送信するサンプル
View NSInvocationSample.m
#import <Foundation/Foundation.h>
/*!
@header
@abstract NSInvocationを使ってメッセージ送信するサンプル
@disucussion Cocoaじゃないと動かないと思います
*/
@interface TestObj : NSObject
- (void)run;
- (BOOL)foo:(BOOL)value;
@end
@mazgi
mazgi / gist:2249596
Created Mar 30, 2012
Xcodeでビルド時のリビジョン取得するのにこーゆースクリプトを登録してる
View gist:2249596
REVISION=$(svn info 2> /dev/null | grep Revision | sed -e 's/Revision: //')
if [ -z ${REVISION} ]; then
REVISION=$(git svn info 2> /dev/null | grep Revision | sed -e 's/Revision: //')
fi
if [ -z ${REVISION} ]; then
REVISION="no rev"
fi
cat<<EOH>Environment.h
#import <Foundation/Foundation.h>
#define REVISION @"${REVISION}"
@mazgi
mazgi / zshrc
Created May 15, 2012
MacOSX/Linuxあたりで使ってるzshrc
View zshrc
autoload colors
colors
UID_COLOR=${fg[green]}
case ${UID} in
0)
UID_COLOR=${fg[red]}
;;
*)
;;
@mazgi
mazgi / config
Created May 17, 2012
Xcode用~/.subversion/config
View config
[auto-props]
Localizable.strings = svn:mime-type=text/plain;charset=UTF-16
@mazgi
mazgi / atnd_users_to_csv.rb
Created May 25, 2012
ATNDの参加者一覧を出力
View atnd_users_to_csv.rb
#!/usr/bin/env ruby
require 'pp'
require 'optparse'
require 'net/http'
require 'json'
Version=0.5
class User
attr_accessor :atnd_name, :is_regular
@mazgi
mazgi / screenrc
Created Jun 1, 2012
/etc/screenrc
View screenrc
startup_message off
shell /bin/zsh
caption always "%{= wk} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wb}%y/%m/%d(%D) %{=b wb}%c"
@mazgi
mazgi / App.pch
Created Jun 3, 2012
デバッグLOG出力
View App.pch
#ifdef DEBUG
extern void _objc_autoreleasePoolPrint();
#define _objc_autoreleasePoolPrint() _objc_autoreleasePoolPrint()
#define __BASENAME__ (strrchr(__FILE__, '/') + 1)
/*!
@define
@abstract デバッグ時のみ出力されるログ
@param 第一引数はフォーマット文字列、以降可変引数
*/
#define LOG(...) \
View .tmux.conf
set-option -g default-shell /bin/zsh
set-window-option -g mode-keys emacs
@mazgi
mazgi / make.conf
Created Jun 8, 2012
/etc/make.conf
View make.conf
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
USE="mmx sse sse2"
USE="$USE bash-completion zsh-completion vim-syntax"
USE="$USE git"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
@mazgi
mazgi / .ssh_config
Created Jun 11, 2012
rackhub用.ssh/config
View .ssh_config
Host *.rackbox.net
IdentityFile ~/.ssh/id_rsa.rackhub