Skip to content

Instantly share code, notes, and snippets.

View teshi04's full-sized avatar
🐟
sakana

Yui Matsuura teshi04

🐟
sakana
View GitHub Profile
@teshi04
teshi04 / adb-screencap.sh
Created July 4, 2014 05:30
adbでスクリーンショットを撮るやつ
#!/bin/sh
DATE=`date '+%y%m%d%H%M%S'`
adb shell screencap -p /sdcard/screen-${DATE}.png
adb pull /sdcard/screen-${DATE}.png
adb shell rm /sdcard/screen-${DATE}.png
# cd後にls
function cd
builtin cd $argv; and ls
end
' 2121/01/27 公安局ビル襲撃ダイアグラム
@startuml
title Raid a Public-Security-Bureau
start
:Nuts cracker task01\nSword Get;
:Rats task01\nBreak into underground parking;
:Nuts cracker task02\nLaunch Spid Loan;
fork
package jp.tsur.android
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View
@teshi04
teshi04 / DeviceOwnerWriteActivity.java
Last active June 13, 2018 18:35
Device owner using NFC on Android Lollipop
MessageDigest digest = null;
try {
digest = MessageDigest.getInstance("SHA-1");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
byte[] apkBytes = new byte[0];
try {
apkBytes = IOUtils.toByteArray(getAssets().open("app-debug.apk"));
@teshi04
teshi04 / gist:8155299
Last active January 1, 2016 13:59
Justaway要望
Justawayマルチアカウント対応おねがいします(厚かましい)
30億のデバイスで走るSyobon ‏@SyobonTech 10時間
pic.twitter [dot] com な画像を受信しようとしても失敗しましたってでる? Back Keyでビューア閉じてもう一度タップすると開けたり開けなかったりする? #justaway
30億のデバイスで走るSyobon ‏@SyobonTech 18分
地下鉄に乗った状態(時々圏外になる環境)でJustaway使って見た際のバッテリの減りは1時間で15%ほど Twiccaとほぼ変わらないくらい Twiccaは複数回Reload 端末はNexus5、LTE、HDSPハンドオーバー複数回 #justaway
https://twitter.com/SyobonTech/status/416941308872105984
30億のデバイスで走るSyobon ‏@SyobonTech 21分
@teshi04
teshi04 / gist:7892158
Last active December 30, 2015 22:09
bareリポ作るときのメモ
cd repos
mkdir shintyoku-bot.git
cd shintyoku-bot.git
git init --bare
cp hooks/post-receive.sample hooks/post-receive
echo (cd /home/teshi/public/shintyoku-bot; git --git-dir=.git pull) >> hooks/post-receive
cd ~/public
git clone ../repos/shintyoku-bot.git
@teshi04
teshi04 / .vimrc
Created August 1, 2013 16:14
途中
" 行番号
set number
" 検索履歴を20残す
set history=20
" インクリメントサーチを使用
set incsearch
" 検索語にマッチした単語をハイライト
set hlsearch
" 対になる括弧を強調
set showmatch
@teshi04
teshi04 / 調味料
Last active December 17, 2015 18:59 — forked from s-aska/調味料
醤油
塩コショウ
バター
七味
@teshi04
teshi04 / tetsuya_img.rb
Last active December 15, 2015 15:08
ブラウザで天使私服テツヤを表示するmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :tetsuya_gazou do
command(:tetsuya_gazou,
name: '天使私服テツヤを表示する',
condition: lambda{ |opt| true },
visible: true,
role: :window) do |opt|
baseurl = 'http://twitpic.com/celd93'