Skip to content

Instantly share code, notes, and snippets.

View diewland's full-sized avatar
🧩
Jigsaw Fam

diewland.eth diewland

🧩
Jigsaw Fam
View GitHub Profile
@diewland
diewland / .tmux.conf
Last active June 23, 2016 06:18
My tmux config
bind j resize-pane -D 5
bind k resize-pane -U 5
bind h resize-pane -L 5
bind l resize-pane -R 5
set -g mouse on
# scroll mouse wheel --> Ctrl-B + [
@diewland
diewland / .vimrc
Last active March 29, 2017 10:51
My vim config
""block cursor
let &t_ti.="\e[1 q"
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"
" remove menus
set go-=m
set go-=T
@diewland
diewland / decomplie_apk.bat
Last active March 27, 2016 14:39
Android de-compile script
@echo off
SET apk=%1
SET fname=%apk:.apk=%
ECHO remove previous folder %fname%..
rm -rf fname
ECHO unzip %apk% to folder %fname%..
unzip -q -o %apk% -d %fname%
@diewland
diewland / build.gradle
Created March 29, 2016 11:10
hotfix gradle build issue ( project/build.gradle )
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenLocal()
maven {
name "jcenter"
url "http://jcenter.bintray.com/"
}
}
@diewland
diewland / ignore_back_button.java
Created April 8, 2016 06:35
Ignore back button in android
@Override
public void onBackPressed() {
// ignore back button
}
@diewland
diewland / oppo-find7a-LINE-not-notify.txt
Last active April 18, 2016 04:41
Oppo Find7a, LINE not notify *** TEST ***
### Actions ###
1.1. Recent app, Swipe down LINE app to prevent LINE from clean up process
or
1.2. Security Center -> Memory cleanup, add LINE to Clean whitelist
2. Security Center -> Privacy permissions, add LINE to Auto-run management
3. Security Center -> Energy saving, disable LINE from Excessive power consumption
### Reference ###
@diewland
diewland / .bashrc
Last active September 23, 2017 17:25
My bashrc
# auto start tmux
if [[ ! $TERM =~ screen ]]; then
tmux a || tmux new
fi
# custom prompt
export PS1="\[\033[36m\]\u\[\033[33;1m\]\w\[\033[0;32m\]\$(__git_ps1 '(%s)') \[\033[36m\]\$\[\033[m\] "
### macos ###
parse_git_branch() {
@diewland
diewland / province_th.js
Last active October 26, 2021 18:44
Javascript Thai provinces array and dict
// https://th.wikipedia.org/wiki/จังหวัดของประเทศไทย
// 77 จังหวัด
var province_th = [
'กรุงเทพฯ',
'กระบี่',
'กาญจนบุรี',
'กาฬสินธุ์',
'กำแพงเพชร',
'ขอนแก่น',
'จันทบุรี',
@diewland
diewland / n10_hdmi_resolution.txt
Created June 16, 2016 04:44
Nexus 10 change resolution script for fix hdmi problem
# ----------------
# http://forum.xda-developers.com/showthread.php?t=2278508
# http://forum.xda-developers.com/showthread.php?t=2294786
#
# (require root)
# reset
wm size reset
wm density reset
wm overscan reset
@diewland
diewland / .gitconfig
Last active January 3, 2017 15:56 — forked from ColinHarrington/.gitconfig
git aliases
[user]
name = diewland
email = diewland@gmail.com
[alias]
st = status
ci = commit
br = branch
co = checkout
l = log --graph --decorate --pretty=oneline --abbrev-commit -n 10
ll = log --graph --decorate --pretty=oneline --abbrev-commit --all