Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Beep boop son, beep boop!

Nguyen Quang Minh minhng99

🤖
Beep boop son, beep boop!
View GitHub Profile
@minhng99
minhng99 / Build_WebView_instruction.txt
Created May 23, 2016
Instruction of build Android System WebView
View Build_WebView_instruction.txt
#!/bin/bash
# Install depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools --depth=1
export PATH=/opt/depot_tools:"$PATH"
# Cloning Chromium source
mkdir chromium
cd chromium
fetch --nohooks android
@minhng99
minhng99 / gist:257465b16b9809799f25325bfeb17ac5
Created Jun 19, 2016 — forked from shakalaca/gist:4942cfb8a4869325cdc9
Howto: compile mkbootimg/mkbootfs/make_ext4fs on OS X
View gist:257465b16b9809799f25325bfeb17ac5
mkdir source
mkdir bin
# clone source
cd source
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/libselinux
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/core
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/zlib
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/extras
@minhng99
minhng99 / mkvendor.sh
Last active Jul 2, 2016
Make vendor tree from dumped /system (without adb) with proprietary-files.txt
View mkvendor.sh
#!/bin/sh
SYSTEMDIR=/system
VENDOR=samsung
DEVICE=js01lte
OUTDIR=vendor/$VENDOR/$DEVICE
mkdir -p $OUTDIR/proprietary
@minhng99
minhng99 / cloudflare-update-record.sh
Last active May 29, 2018 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
View cloudflare-update-record.sh
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl --interface eth0 -s http://ipv4.icanhazip.com)
View gist:72668a845536044f4e419c39518c5964
======= Debug Command Listing =======
AT just answer OK
ATHE print help
ATBAx change baudrate. 1:38.4k, 2:19.2k, 3:9.6k 4:57.6k 5:115.2k
ATENx,(y) set BootExtension Debug Flag (y=password)
ATSE show the seed of password generator
ATTI(h,m,s) change system time to hour:min:sec or show current time
ATDA(y,m,d) change system date to year/month/day or show current date
ATDS dump RAS stack
ATDT dump Boot Module Common Area
View rm special char.sh
#!/bin/bash
find a/ -type f -print | while read f
do
mv "$f" "$(sed 's/[^0-9A-Za-z_./()- ]/_/g' <<< "$f")"
done
View fix-wordpress-permissions.sh
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@minhng99
minhng99 / .config
Created Dec 31, 2018
PogoPlug v4 minimal kernel 4.20.0 config, tested running Arch Linux
View .config
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 4.20.0 Kernel Configuration
#
#
# Compiler: arm-none-eabi-gcc (Arch Repository) 8.2.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=80200
View spc.bat
set OPENSSL_CONF=D:\Program Files\OpenSSL-Win64\bin\openssl.cfg
set PATH=D:\Program Files\OpenSSL-Win64\bin
echo "%1"
openssl pkcs12 -in "%1" -nocerts -nodes -out "FINAL_key.pem"
openssl rsa -in "FINAL_key.pem" -outform PVK -pvk-strong -out "FINAL.pvk"
openssl pkcs12 -in "%1" -nokeys -nodes -out "FINAL_cert.pem"
openssl crl2pkcs7 -nocrl -certfile "FINAL_cert.pem" -outform DER -out "FINAL.spc"
del "FINAL_key.pem"