Skip to content

Instantly share code, notes, and snippets.

View androidzhibinw's full-sized avatar
😅
tired

zhibinw androidzhibinw

😅
tired
View GitHub Profile
dataPath:/data/app/your.package.name-1/base.apk
persistentDataPath:/storage/emulated/0/Android/data/your.package.name/files
streamingAssetsPath:jar:file:///data/app/your.package.name-1/base.apk!/assets
temporaryCachePath:/storage/emulated/0/Android/data/your.package.name/cache
@androidzhibinw
androidzhibinw / Unity-Profiler-Android.md
Last active November 8, 2023 01:43
Unity profiler for Android
  1. First you select development build for Android.(Build Settings-> Android -> check Develop Build box)

  2. Here is the guide from Unity doc: https://docs.unity3d.com/Manual/ProfilerWindow.html

  3. Before the 'adb forward' you should check the port(34999) first using: netstat -a -o -n | find "34999"

  4. Kill the process that alreay take the port "34999" using: taskkill /F /PID process_id

  5. adb forward --remove-all

# -*- coding: utf-8 -*-
@androidzhibinw
androidzhibinw / flask-flash-bootstrap
Created January 27, 2016 10:36 — forked from victorkristof/flask-flash-bootstrap
Flask flash messages as Bootstrap alert.
{% with messages = get_flashed_messages(with_categories=true) %}
<!-- Categories: success (green), info (blue), warning (yellow), danger (red) -->
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<!-- <strong>Title</strong> --> {{ message }}
</div>
{% endfor %}
{% endif %}
@androidzhibinw
androidzhibinw / model.py
Created January 21, 2016 08:16
sqlalchemy time created update
created_on = db.Column(db.DateTime, server_default=db.func.now())
updated_on = db.Column(db.DateTime, server_default=db.func.now(), onupdate=db.func.now())
@androidzhibinw
androidzhibinw / auto_format_python.sh
Created January 21, 2016 07:18
usage of autopep8
pip install autopep8
autopep8 your_script.py # dry-run, only print
autopep8 -i your_script.py # replace content
@androidzhibinw
androidzhibinw / json.py
Created January 20, 2016 10:48
construct json python
data = {}
data['key'] = 'value'
json_data = json.dumps(data)
@androidzhibinw
androidzhibinw / input_number_disable_spin.css
Created January 20, 2016 06:50
disable input number spin
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
@androidzhibinw
androidzhibinw / jqueryajax.post.js
Created January 20, 2016 01:58
jquery ajax post example
$(document).ready(function (){
$('#btn-send').click(function countdown(){
var phoneNumber = $('#phone').val()
$.ajax({
method: "POST",
url: "/getcode",
data: JSON.stringify({"number":phoneNumber},null,4),
contentType:'application/json;charset=UTF-8'
})
30 });
@androidzhibinw
androidzhibinw / foo.log
Created January 15, 2016 02:57 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred