Skip to content

Instantly share code, notes, and snippets.

@hidenorly
hidenorly / build.gradle
Created November 1, 2017 13:19
dex2jar を buildして、新しめのandroid のclasses.dex で利用する ref: http://qiita.com/hidenorly/items/03fe583def72b727c699
mainClassName="com.googlecode.dex2jar.tools.BaseCmd"
dependencies {
compile project(':dex-translator')
compile project(':d2j-smali')
compile project(':d2j-jasmin')
compile project(':dex-writer')
compile project(':d2j-base-cmd')
// compile "com.google.android.tools:dx:23.0.0"
}
@hidenorly
hidenorly / file0.txt
Last active May 3, 2017 15:06
Raspberry Pi (Zero (W)) 上で OpenCV を動かして USB Camera からの画像をJPEG保存してみる ref: http://qiita.com/hidenorly/items/864e25be64b41b53d0ef
$ lsusb
lsusb
Bus 001 Device 006: ID 046d:0808 Logitech, Inc. Webcam C600
..snip..
$ ls /dev/video*
/dev/video0
@hidenorly
hidenorly / dashbtnlauncher.service
Last active January 9, 2017 17:28
おうちハック: Bluetooth LED を 防犯ライト! 定期起動 スマホとの近接判定 Dashで物理スイッチ (俺scriptのservice化) ref: http://qiita.com/hidenorly/items/c9babbb2c1a1ad97c22a
[Unit]
Description = Ble Button Controller with Dash Button
[Service]
ExecStart = /usr/local/bin/node /opt/DashBtnLauncher/DashBtnLauncher.js -b XX:XX:XX:XX:XX:XX -e /root/bin/bleBulbDriver.rb alltoggle
Restart = always
Type = simple
[Install]
WantedBy = multi-user.target
@hidenorly
hidenorly / file0.txt
Last active March 5, 2017 15:21
Raspberry Pi3 on Ubuntu Mate 16.04 で Amazon Dash を ただのIoTボタンとして使う ref: http://qiita.com/hidenorly/items/75634f00cda10a068d40
$ sudo apt-get install -y nodejs npm
$ sudo npm cache clean
$ sudo npm install n -g
$ sudo n stable
$ sudo ln -sf /usr/local/bin/node /usr/bin/node
@hidenorly
hidenorly / rules.cfg
Last active January 8, 2017 07:27
iPhoneなど Bluetooth が 近接した時、離れた時に、何かする ref: http://qiita.com/hidenorly/items/50615b208f74575bf6e4
[13:30-23:30 Mon Tue Wed Thu Fri Sat Sun]
#onStart
echo "blub On"
bleBulbDriver.rb allOn
#onEnd
bleBulbDriver.rb allOff
#onConnected
bleBulbDriver.rb allOff
#onDisconnected
bleBulbDriver.rb allOn
@hidenorly
hidenorly / file0.txt
Last active January 8, 2017 07:29
Bluetooth LE (BLE) SATECHI LED電球 を Raspberry Pi3 から 制御 ref: http://qiita.com/hidenorly/items/757ce2d949846e035bc2
$ sudo rfkill unblock bluetooth
$ sudo hciconfig hci0 up
@hidenorly
hidenorly / bluetooth.service
Last active March 15, 2017 13:44
Raspberry Pi3 の Bluetooth を Ubuntu Mate 16.04 LTS で使えるようにする ref: http://qiita.com/hidenorly/items/1c7ff9ce41edfa7d3aee
-ExecStart=/usr/lib/bluetooth/bluetoothd
+ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
@hidenorly
hidenorly / .bashrc
Last active July 7, 2016 17:25
TensorFlow, Caffe, Chainer と Deep Learning大御所を一気に source code build で GPU向けに setupしてみた ref: http://qiita.com/hidenorly/items/9f614534db1b151b3b93
export CUDA_PATH=$CUDA_HOME
@hidenorly
hidenorly / file0.txt
Last active July 7, 2016 16:44
GTX-1080 など GeForce を Ubuntu 16.04 LTS で CUDA-8.0RC と共に使う ref: http://qiita.com/hidenorly/items/a3eb3a0375e6703d163b
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt-get update
$ sudo apt-get install nvidia-367
$ sudo apt-get install mesa-common-dev
$ sudo apt-get install freeglut3-dev
@hidenorly
hidenorly / file0.txt
Last active June 8, 2017 02:57
git-deps で 依存コミット の 一挙 洗い出し (gitだけでやるやり方も) ref: http://qiita.com/hidenorly/items/e7f16fe9d76d044297c3
$ git show b5e4722891e7bbf2fffcd995af02838667a3abab
commit b5e4722891e7bbf2fffcd995af02838667a3abab
Author: Adrian Roos <roosa@google.com>
Date: Fri Aug 14 15:53:06 2015 -0700
Add StrongAuthTracker
Bug: 22846469
Bug: 22115393
Change-Id: I6ef5322d02e540fc043e7f20d3aabf595ce7c224