Skip to content

Instantly share code, notes, and snippets.

View ltpquang's full-sized avatar
🤪

Lê Thái Phúc Quang ltpquang

🤪
View GitHub Profile
{"name":{"common":"Vietnam", "official":"Socialist Republic of Vietnam", "native":{"vie":{"official":"Cộng hòa xã hội chủ nghĩa Việt Nam", "common":"Việt Nam"}}}, "tld":[".vn"], "cca2":"VN", "ccn3":"704", "cca3":"VNM", "currency":["VND"], "callingCode":["84"], "capital":"Hanoi", "altSpellings":["VN", "Socialist Republic of Vietnam", "Cộng hòa Xã hội chủ nghĩa Việt Nam"], "relevance":"1.5", "region":"Asia", "subregion":"South-Eastern Asia", "languages":{"vie":"Vietnamese"}, "translations":{"deu":{"official":"Sozialistische Republik Vietnam", "common":"Vietnam"}, "fra":{"official":"République socialiste du Vietnam", "common":"Viêt Nam"}, "hrv":{"official":"Socijalistička Republika Vijetnam", "common":"Vijetnam"}, "ita":{"official":"Repubblica socialista del Vietnam", "common":"Vietnam"}, "jpn":{"official":"ベトナム社会主義共和国", "common":"ベトナム"}, "nld":{"official":"Socialistische Republiek Vietnam", "common":"Vietnam"}, "por":{"official":"República Socialista do Vietname", "common":"Vietname"}, "rus":{"official":"Социал
#!/bin/bash
rm -rf ~/.gradle/caches/$GRADLE_VERSION/
rm -rf ~/.gradle/daemon/
find ~/.gradle/caches/ -name "*.lock" -type f -delete
@ltpquang
ltpquang / eth_wallet_gen.py
Created March 17, 2021 08:40
Python3 script to genenerate ETH wallet
import codecs
import os
import csv
import ecdsa
from Crypto.Hash import keccak
def gen():
private_key_bytes = os.urandom(32)
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appActivity":"vn.com.ltpquang.ui.activity.SplashScreenActivity","appPackage":"vn.com.ltpquang","settings[waitForIdleTimeout]":200,"noReset":"true","newCommandTimeout":"0","adbExecTimeout":"60000","automationName":"uiAutomator2","platformName":"Android","udid":"N7MRTCHA99999999","fullReset":"false"},"capabilities":{"firstMatch":[{"platformName":"android"}]}}
[W3C] Calling AppiumDriver.createSession() with args: [{"appActivity":"vn.com.ltpquang.ui.activity.SplashScreenActivity","appPackage":"vn.com.ltpquang","settings[waitForIdleTimeout]":200,"noReset":"true","newCommandTimeout":"0","adbExecTimeout":"60000","automationName":"uiAutomator2","platformName":"Android","udid":"N7MRTCHA99999999","fullReset":"false"},null,{"firstMatch":[{"platformName":"android"}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1605635455827 (00:50:55 GMT+0700 (Indochina Time))
[Appium] The following capabilities were provided in the JSONWP desired capabilities that a
@ltpquang
ltpquang / com.company.appium.server.plist
Created May 28, 2020 06:16 — forked from risinek/com.company.appium.server.plist
This is the example of working plist to run Appium server using launchctl on Mac. See comments for more info and steps how to use this.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
@ltpquang
ltpquang / sig_compute_postman.js
Last active July 25, 2019 12:02
Postman pre-request script with sig computation
pm.globals.set("$reqdate", new Date().getTime());
/////////////////////////////////
// Example:
// - Request params
// keya: {{$global_variable_a}}
// keyb: {{$global_variable_b}}
// keyc: fixed_value_c
// keyd: {{env_variable_d}}
// - Required signature data
@ltpquang
ltpquang / .bash_profile
Created April 13, 2018 09:36 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ltpquang
ltpquang / SimpleAudioExtractor.java
Created June 12, 2017 03:42
Extract, decode, repeat cycle
/**
* Created by ltpquang on 12/20/16.
* <p>
* "Whether you think you can, or you think you can't - you're right."
* --Henry Ford--
*/
public class SimpleAudioExtractor {
private static final String TAG = SimpleAudioExtractor.class.getSimpleName();
int TIMEOUT_USEC = 10000;
@ltpquang
ltpquang / Color hex alpha components
Created May 12, 2017 06:44
List of alpha components and corresponding transparency
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C