Skip to content

Instantly share code, notes, and snippets.

View 01en's full-sized avatar
🚀
Enter by the narrow gate

01en [archived] 01en

🚀
Enter by the narrow gate
View GitHub Profile
@01en
01en / adb_commands.sh
Created July 3, 2016 10:43
adbコマンド集
# インストールされているアプリのパッケージ名一覧を取得
$ adb shell pm list package
@01en
01en / karabiner-setting.xml
Created November 6, 2016 15:26
Karabiner my keybind setting
<?xml version="1.0"?>
<root>
<appdef>
<appname>ECLIPSE</appname>
<equal>org.eclipse.platfrom.ide</equal>
</appdef>
<item>
<name>Escape to EISUU+Escape</name>
<identifier>remap.jis_escape2eisuuAndEscape_terminal</identifier>
<autogen>--KeyOverlaidModifier-- KeyCode::ESCAPE, KeyCode::JIS_EISUU, KeyCode::ESCAPE</autogen>

sed

grep

よく使う

  • ディレクトリを再帰的に検索
$ grep -r dir
  • ディレクトリを再帰的に検索し、行番号も表示
$ grep -rn dir
@01en
01en / file0.txt
Created November 3, 2017 14:07
HEICファイルをJPGファイルに変換する ref: http://qiita.com/enter178/items/83098b1be474db3e8bda
$ sips --setProperty format jpeg input.heic --out output.jpg
{"phrase": "荒野を走れどこまでも"}

Gio.js Try Sample

Very Simple Visualizing 3D Earth Model by using Gio.js.

This is a sample to try using this.

Usage

$ npm install 
@01en
01en / how-to-use-nature-remo-api.md
Last active November 18, 2018 05:06
Nature Remo APIの使い方メモ

Nature Remo APIの使い方

環境設定

使い方

curl -H "accept: application/json" -H "Authorization: Bearer [取得したAccessToken]" -X GET "https://api.nature.global/[API Path]"
  • jqコマンドで見るといい
@01en
01en / Moves-get-accessToken.php
Created February 17, 2019 12:59
Movesで利用するアクセストークンを取得。
<?php
// 設定項目
$client_id = '<client_id>' ; // クライアントID
$uuuent_secret = '<client_secret>' ; // クライアントシークレット
$redirect_uri = ( !isset($_SERVER['HTTPS']) || empty($_SERVER['HTTPS']) ? 'http://' : 'https://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ; // このプログラムを設置するURL
$scope = 'activity location' ; // アプリの権限
// セッションスタート

定理1:Small is beautiful

  • 大きな何かよりも小さい何かの方が,人間にはわかりやすいし,理解しやすい
  • 当然,保守も容易で結果的に費用対効果が大きくなる
  • システムリソースを小さく
  • 他のツールと簡単に結合・再利用できる

定理2:1つのプログラムには1つのことをうまくやらせる

  • やるべきことの本質を理解できているはず.このプログラムが書けないならば,それは理解できていないということ
  • 小さくするには,目的を絞る必要がある
  • 1つのプログラムで1つの問題を解決
@01en
01en / cvim-my-setting.txt
Created August 10, 2019 08:00
Setting of cvim for Chrome Extensios
"""""""""""""""""""""""""""""""""""""""
""""" Basic Settings
"""""""""""""""""""""""""""""""""""""""
set noautofocus
set cncpcompletion
let scrollstep = 250
let locale = "jp"
let barposition = "bottom"
map gR reverseImage
map : ;