Skip to content

Instantly share code, notes, and snippets.

View vanleantking's full-sized avatar
🤣

Le Van vanleantking

🤣
  • U
  • Binh Thanh
View GitHub Profile
@vanleantking
vanleantking / phpstorm_evaluation_license_reset.md
Created February 20, 2023 14:49 — forked from Gyvastis/phpstorm_evaluation_license_reset.md
PhpStorm reset evaluation license/period

PhpStorm reset evaluation license/period

Make sure to export/import your settings through File -> Manage IDE settings before/after

Windows 10

  1. Close PHPStorm
  2. Run these in PowerShell to remove PhpStorm configuration:
Remove-Item '.\AppData\Local\Jetbrains\PhpStorm*'
Remove-Item '.\AppData\Roaming\Jetbrains\PhpStorm*'
@vanleantking
vanleantking / it-ebooks.md
Created November 22, 2021 16:08 — forked from baiwfg2/it-ebooks.md
Download ebooks as you want
@vanleantking
vanleantking / MySql-5.6-installation guide.md
Created July 5, 2021 04:41 — forked from vinodpandey/MySql-5.6-installation guide.md
Install MySQL 5.6.xx on Ubuntu 18.04 & Ubuntu 20.04

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
@vanleantking
vanleantking / context_cancel.go
Created June 8, 2021 14:30 — forked from fracasula/context_cancel.go
GoLang exiting from multiple go routines with context and wait group
package main
// Here's a simple example to show how to properly terminate multiple go routines by using a context.
// Thanks to the WaitGroup we'll be able to end all go routines gracefully before the main function ends.
import (
"context"
"fmt"
"math/rand"
"os"
@vanleantking
vanleantking / VideoDownloader.java
Created May 26, 2021 17:11 — forked from fnk0/VideoDownloader.java
Example of how to download a video using Okhttp and show a progress bar to the user
class VideoDownloader extends AsyncTask<Void, Long, Boolean> {
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected Boolean doInBackground(Void... params) {
@vanleantking
vanleantking / FileUtil.java
Created May 25, 2021 17:47 — forked from suweya/FileUtil.java
OkHttp download file by Okio
import android.os.Environment;
import android.support.annotation.NonNull;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;
@vanleantking
vanleantking / genymotion-4.x.md
Created May 22, 2021 07:58 — forked from 1nikolas/genymotion-4.x.md
Install Android 4.1, 4.2, 4.3 on Genymotion

Install Android 4.1, 4.2, 4.3 on Genymotion

I found a way to install older Android versions (4.x) on latest version of Genymotion. I only tested it on Windows but it should work on Mac and Linux too. So here is what you need to do:

Step 1

Download the required Android image. I've reuploaded the files to Mega and saved them on the WayBack Machine.

@vanleantking
vanleantking / walksync.js
Created May 18, 2021 04:45 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@vanleantking
vanleantking / uninstall_python3.MD
Created April 22, 2021 14:09 — forked from zhensongren/uninstall_python3.MD
How to uninstall python3 from Ubuntu

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5

@vanleantking
vanleantking / vietnam-banks
Created March 10, 2021 07:11 — forked from trihtm/vietnam-banks
Vietnam Banks information format by json
{
"banksnapas": [
{
"en_name": "An Binh Commercial Joint stock Bank",
"vn_name": "Ngân hàng An Bình",
"bankId": "970425",
"atmBin": "970425",
"cardLength": 16,
"shortName": "ABBank",
"bankCode": "323",