Skip to content

Instantly share code, notes, and snippets.

raimon raimon49

Block or report user

Report or block raimon49

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raimon49
raimon49 / change_repo_to_github.sh
Created Jul 31, 2016
vvmコマンドのソースコード取得先をGitに変更
View change_repo_to_github.sh
# インストール済みvvmの更新
$ cd ~/.vvm/repos/vvm
$ git pull origin master
# clone済みhgリポジトリを削除
$ cd ~/.vvm/repos
$ rm -rf vimorg
# git tagを指定してVimをビルド
$ vvm install vimorg--v7.4.2133 --with-features=big --enable-multibyte --without-x --disable-gui --enable-luainterp --with-lua-prefix=/usr
@raimon49
raimon49 / AppDelegate.m
Created May 26, 2015
Ignoring certificate errors with NSURLConnection
View AppDelegate.m
@implementation NSURLRequest(OOA)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host {
return YES;
}
@end
@raimon49
raimon49 / install_icdiff_at_home.sh
Created Dec 14, 2014
icdiffをGitのサブコマンドとして使えるよう自分のHOMEにインストール
View install_icdiff_at_home.sh
$ curl 'https://raw.githubusercontent.com/jeffkaufman/icdiff/release-1.6.0/icdiff' -s -o ~/local/bin/icdiff
$ curl 'https://raw.githubusercontent.com/jeffkaufman/icdiff/release-1.6.0/git-icdiff' -s -o ~/local/bin/git-icdiff
$ chmod 755 ~/local/bin/icdiff
$ chmod 755 ~/local/bin/git-icdiff
@raimon49
raimon49 / install_jq_at_home.sh
Created Dec 14, 2014
jqのLinux 64bitバイナリを自分のHOMEにインストール
View install_jq_at_home.sh
$ wget 'http://stedolan.github.io/jq/download/linux64/jq' -O ~/local/bin/jq
$ chmod 755 ~/local/bin/jq
$ jq --help
jq - commandline JSON processor [version 1.4]
Usage: jq [options] <jq filter> [file...]
For a description of the command line options and
how to write jq filters (and why you might want to)
@raimon49
raimon49 / echo_filetypes.vim
Created May 26, 2014
filetypeの一覧を出力
View echo_filetypes.vim
:echo join(map(split(globpath(&rtp, 'ftplugin/*.vim'), '\n'), 'fnamemodify(v:val, ":t:r")'), "\n")
@raimon49
raimon49 / install_tig_on_ubuntu.sh
Created May 2, 2014
Ubuntu Server 12.04 LTSにTig 最新版(2.0.1)を入れる
View install_tig_on_ubuntu.sh
# 日本語用
$ sudo apt-get install libncursesw5-dev
# ソースコード取得
$ git clone https://github.com/jonas/tig.git
$ cd tig
$ git checkout -b my-build-2.0.1 tig-2.0.1
# ビルド, インストール
$ LDLIBS=-lncursesw CFLAGS=-I/usr/include/ncursesw make install prefix=$HOME/local
@raimon49
raimon49 / gist:9719585
Created Mar 23, 2014
checkoutしてる側でsubmoduleのリポジトリ変更に追従
View gist:9719585
# [submodule "module-name"] から対象のリポジトリエントリを削除
$ vim .git/config
# それまでcheckoutしていたリポジトリを削除
$ cd .git/modules
$ rm -rf module-name
# Dマークが付くが、無視して再度submoduleを初期化
$ git submodule update --init
@raimon49
raimon49 / install_guest_additions.sh
Last active Aug 29, 2015
Ubuntu Server 12.04 LTSにVirtualBoxのGuest Additionsを入れる
View install_guest_additions.sh
# [デバイス] -> [Guest AdditionsのCDイメージを挿入]
$ sudo mount /dev/dvd /mnt
$ sudo apt-get install xserver-xorg xserver-xorg-core
$ sudo sh /mnt/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.8 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.8 of VirtualBox Guest Additions...
Copying additional installer modules ...
@raimon49
raimon49 / migrate_from_ruby-2.0.0_to_ruby-2.1.1.sh
Created Mar 5, 2014
XREAサーバのruby-2.0.0からruby-2.1.1へ移行
View migrate_from_ruby-2.0.0_to_ruby-2.1.1.sh
# Rubyのインストール
$ wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.bz2
$ bunzip2 ruby-2.1.1.tar.bz2
$ tar xf ruby-2.1.1.tar
$ cd ruby-2.1.1
$ ./configure --prefix=$HOME/ruby-2.1.1 --disable-install-doc --disable-install-rdoc
$ make
$ make install
$ ~/ruby-2.1.1/bin/ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [i686-linux]
@raimon49
raimon49 / gist:9031914
Last active Aug 29, 2015
Effective Objective-C 2.0メモ
View gist:9031914
// 読み出しを通常のブロック, 書き込みをバリアブロックとして並列キューで処理
_syncQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
- (NSString *)someString
{
__block NSString *localSomeString;
dispatch__sync(_syncQueue, ^{
localSomeString = _someString;
});
return localSomeString;
You can’t perform that action at this time.