2015-05-09から1日間の記事一覧

emacsをターミナルから起動するシェル設定

function emacs(){ is_running=$(ps aux | grep Emacs.app | wc -l) if [ $# -eq 0 ]; then if [ $is_running -gt 1 ]; then osascript -e ' tell application "Emacs" activate end tell ' else cmd="/Applications/Emacs.app/Contents/MacOS/Emacs &" eval…

AndroidのUSBホスト機能を使ってUSBホストシールドを使わずにArduinoとUSBで通信する

http://shokai.org/blog/archives/6962 USBホストケーブルが必要 http://www.amazon.co.jp/SANWA-SUPPLY-USB%E3%83%9B%E3%82%B9%E3%83%88%E5%A4%89%E6%8F%9B%E3%82%A2%E3%83%80%E3%83%97%E3%82%BF%E3%82%B1%E3%83%BC%E3%83%96%E3%83%AB-MicroB%E3%82%AA%E3%8…

Androidでサポートされているセンサを取得する

http://seesaawiki.jp/w/moonlight_aska/d/%A5%BB%A5%F3%A5%B5%A1%BC%A4%CE%B0%EC%CD%F7%A4%F2%BC%E8%C6%C0%A4%B9%A4%EBNexus5で試した MPU6515 Accelerometer AK8963 Magnetometer AK8963 Magnetometer Uncalibrated MPU6515 Gyroscope MPU6515 Gyroscope U…

Chromeで開いていたタブを復活させる

http://qiita.com/livejam_db/items/f4e176c06ffbff89c590 Shift+Command+Tで復活

Android Studioで不要なimportを一括で削除する

http://stackoverflow.com/questions/22273434/remove-unused-imports-in-android-studio Control + Option + O でいける。

ターミナルでswiftをビルドする

http://owensd.io/2015/01/15/swift-makefiles-take-2.html foo.swift public func foo() -> String { let message = testing() return "Foo - \(message)" } main.swift import Foundation public func testing() -> String { return "testing!" } println(…

Vimでswiftを書く

うまくftdetectが走らず.swiftを見つけられないので.vimrcに直接指定した au BufNewFile,BufRead *.swift set filetype=swift NeoBundle 'Keithbsmiley/swift.vim'http://stackoverflow.com/questions/5602767/why-is-vim-not-detecting-my-coffescript-file…