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 / 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 / .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 / download_flickr_photos.py
Created November 16, 2016 10:57
Download flickr 100 photos from api
import requests
import urllib
tag = 'person'
url = "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=881cbcfeb398828ea12b253c1743224e&text=%s&format=json&nojsoncallback=1" % tag
proxies = {'http': 'http://your.proxy:port/'}
r = requests.get(url)
image = urllib.URLopener(proxies)
@diewland
diewland / debug_post.php
Last active December 22, 2016 01:14
Display beautiful variable data to screen
function debug_post(){
echo '<pre>'.print_r($_POST, true).'</pre>';
}
@diewland
diewland / php_to_js.php
Last active January 3, 2017 08:32
Transform data from php to javascript
<script>
<?php
echo "var data = ".json_encode($data).";";
?>
</script>
@diewland
diewland / edit_git_config.sh
Created January 3, 2017 15:56
Edit .gitconfig global file
git config --global -e
@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