This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" guifontオプションは"フォント名:hフォント高"の形式で設定しておく必要がある | |
function! ResizeFontGetGuiFontOption() | |
let matches = matchlist(&guifont, '\(.*\):h\(\d\+\)\(:.*\)\?') | |
if empty(matches) && matches[2] == '' | |
return {} | |
endif | |
return {'name': matches[1], 'size': matches[2], 'opts': matches[3]} | |
endfunction | |
function! ResizeFontBy(amount) | |
let font = ResizeFontGetGuiFontOption() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = (thing)-> | |
stringnize = (obj)-> | |
switch typeof_(obj) | |
when 'Null' | |
return 'nil' | |
when 'Object' | |
return "{#{(":#{k} => #{stringnize(v)}" for k, v of obj).join(', ')}}" | |
when 'Array' | |
return "[#{(stringnize(e) for e in obj).join(', ')}]" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typeof_ = (thing)-> | |
if thing is null | |
'Null' # Special case | |
else | |
Object.prototype.toString.call(thing).match(/^\[object\s(.*)\]$/)[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# NOTE: $1 must be absolute path. | |
open -a `xcode-select -print-path`/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app --args -SimulateApplication $1 | |
osascript 2>/dev/null <<EOF | |
tell application "System Events" | |
tell process "iPhone Simulator" to keystroke "2" using command down | |
end | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rm -rf ~/Library/MobileDevice/Provisiong\ Profile | |
# KeychainからProvisiong Profileに対応する証明書を削除する | |
$ defaults delete com.apple.dt.Xcode DTDKPortalCache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<deviceproductdef> | |
<productname>KENSINGTON_USB_PS2_EXPERT_MOUSE</productname> | |
<productid>0x1015</productid> | |
</deviceproductdef> | |
<deviceproductdef> | |
<!-- MacBook Pro 15-inch Late 2008 --> | |
<productname>APPLE_INTERNAL_KEYBOARD_TRACKPAD_0x0238</productname> | |
<productid>0x0238</productid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-arch x86_64 | |
-fmacro-backtrace-limit=0 | |
-std=gnu99 | |
-fblocks | |
-fobjc-arc | |
-fmodules | |
-mios-simulator-version-min=8.0 | |
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk | |
-D DEBUG | |
-I Pods/Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! <SID>XcodeRunCurrentTarget() | |
let l:apple_script = 'tell application "Xcode"' | |
\. "\n". ' activate' | |
\. "\n". ' tell application "System Events"' | |
\. "\n". ' key code 15 using {command down}' | |
\. "\n". ' end tell' | |
\. "\n". 'end tell' | |
call system(printf("osascript -e '%s'", l:apple_script)) | |
endfunction | |
nnoremap <buffer> <F5> :call <SID>XcodeRunCurrentTarget()<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" MacVimの起動時、アプリケーション切り替え時にKeyRemap4MacBookコマンドラインを実行してポインティング・デバイスを有効・無効にする | |
let g:keyremap4macbook_cmd = '/Applications/KeyRemap4MacBook.app/Contents/Applications/KeyRemap4MacBook_cli.app/Contents/MacOS/KeyRemap4MacBook_cli' | |
let g:keyremap4macbook_pointing_device_ignoring_cmd = g:keyremap4macbook_cmd . ' set notsave.private.pointing_device_ignoring ' | |
augroup VimrcEx | |
autocmd! | |
" ポインティング・デバイスの有効・無効 | |
autocmd FocusGained,VimEnter * | |
\ let out = system(g:keyremap4macbook_pointing_device_ignoring_cmd . '1') | |
\| if out != '' | echoerr out | endif |
OlderNewer