Skip to content

Instantly share code, notes, and snippets.

View marutanm's full-sized avatar
👁️‍🗨️

Ryo Fujita marutanm

👁️‍🗨️
View GitHub Profile
@marutanm
marutanm / settings.json
Last active July 11, 2019 01:44
VSCode
{
"vim.leader": " ",
"vim.hlsearch": true,
"vim.visualstar": true,
"vim.whichwrap": "h,l,<,>,[,]",
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [";"],
"after": [":"]
},
" ファイル種類の自動判別とそれに応じた適切設定/インデントを行なう。
filetype plugin indent on
" ファイルの種類に応じたシンタックスハイライトを有効にする。
syntax enable
set t_Co=256
set imdisable
set showcmd "コマンドをステータスラインに表示
set number "行番号を表示する
@marutanm
marutanm / config.json
Created January 5, 2016 06:49
peco/config.json
{
"Keymap": {
"C-l": "peco.DeleteAll",
"C-v": "peco.SelectNextPage",
"C-m": "peco.Finish",
"C-j": "peco.Finish",
"C-g": "peco.Cancel"
@marutanm
marutanm / Rakefile
Last active August 29, 2015 14:13 — forked from g-1/Rakefile
Cocos2d-x v3.3対応版
# 事前にTARGETS > Build Settings > Architecturesに'i386'を追加する
PROJECT_PATH = "../cocos2d/build/cocos2d_libs.xcodeproj"
TARGET_NAME="'libcocos2d iOS'"
OUTPUT_DEBUG="tmp/iphonesimulator"
OUTPUT_RELEASE="tmp/iphoneos"
OUTPUT_LIB="../lib"
desc "静的ライブラリをビルドします"
task "lib" do
sh "xcodebuild -project #{PROJECT_PATH} -configuration Release -sdk iphonesimulator7.1 -target #{TARGET_NAME} TARGET_BUILD_DIR=../../build/#{OUTPUT_DEBUG} BUILT_PRODUCTS_DIR=../../build/#{OUTPUT_DEBUG} clean build"
'.editor':
'shift-space': 'autocomplete:toggle'
'ctrl-[': 'core:cancel'
@marutanm
marutanm / private.xml
Last active August 29, 2015 13:56
POST via shift+return
<?xml version="1.0"?>
<root>
<appdef>
<appname>HIPCHAT</appname>
<equal>com.hipchat.HipChat</equal>
</appdef>
<item>
<name>Swap Enter and Shift+Enter on HipChat.app</name>
<identifier>private.hipchat_return_to_shift_return</identifier>
{
"tab_size": 2,
"translate_tabs_to_spaces": true
}
NSarray *fileList = @[@"fileA", @"fileB", @"fileC", @"fileD"];
NSUInteger randomIndex = arc4random() % [fileList count];
NSString *selectedFile = [fileList objectAtIndex:randomIndex];
// http://stackoverflow.com/questions/3318902/picking-a-random-object-in-an-nsarray
@marutanm
marutanm / gist:5962809
Created July 10, 2013 01:30
KeyRemap4MacBook
#!/bin/sh
cli=/Applications/KeyRemap4MacBook.app/Contents/Applications/KeyRemap4MacBook_cli.app/Contents/MacOS/KeyRemap4MacBook_cli
$cli set general.dont_remap_internal 1
/bin/echo -n .
$cli set remap.escape2backquote 1
/bin/echo -n .
$cli set repeat.wait 40
/bin/echo -n .
irb(main):001:0> require 'Fog'
irb(main):002:0> glacier = Fog::AWS::Glacier.new aws_access_key_id: '', aws_secret_access_key: '', region: 'ap-northeast-1'
irb(main):003:0> vault = glacier.vaults.get 'Aperture'
irb(main):005:0> vault.archives.create body: File.new('2006.apvault.tgz'), multipart_chunk_size: 1024*1024