Skip to content

Instantly share code, notes, and snippets.

View soiqualang's full-sized avatar
🙃
hihihaha

Đỗ Thành Long soiqualang

🙃
hihihaha
View GitHub Profile
@reoring
reoring / gist:3ff898c90a81073ea37b96e0fef8746b
Last active October 25, 2022 02:50
docker-compose.yml for php and postgresql

html/index.php

<?php

phpinfo();

docker/Dockerfile

Function UniConvert(Text As String, InputMethod As String) As String
Dim VNI_Type, Telex_Type, CharCode, Temp, i As Long
UniConvert = Text
VNI_Type = Array("a81", "a82", "a83", "a84", "a85", "a61", "a62", "a63", "a64", "a65", "e61", _
"e62", "e63", "e64", "e65", "o61", "o62", "o63", "o64", "o65", "o71", "o72", "o73", "o74", _
"o75", "u71", "u72", "u73", "u74", "u75", "a1", "a2", "a3", "a4", "a5", "a8", "a6", "d9", _
"e1", "e2", "e3", "e4", "e5", "e6", "i1", "i2", "i3", "i4", "i5", "o1", "o2", "o3", "o4", _
"o5", "o6", "o7", "u1", "u2", "u3", "u4", "u5", "u7", "y1", "y2", "y3", "y4", "y5")
Telex_Type = Array("aws", "awf", "awr", "awx", "awj", "aas", "aaf", "aar", "aax", "aaj", "ees", _
"eef", "eer", "eex", "eej", "oos", "oof", "oor", "oox", "ooj", "ows", "owf", "owr", "owx", _
@CMCDragonkai
CMCDragonkai / npmatrix_to_geotiff.py
Last active June 28, 2019 02:34
Numpy Matrix to GDAL GeoTiff #python #gdal #numpy
import numpy as np
from osgeo import gdal, gdal_array, osr
def npmatrix_to_geotiff (filepath, matrices, gdal_type, transform = None, projection = None, nodata = None):
(y_res, x_res) = matrices[0].shape
driver = gdal.GetDriverByName('GTiff')
image = driver.Create(filepath, x_res, y_res, len(matrices), gdal_type)
if transform is not None:
image.SetGeoTransform(transform)
if projection is not None:
@jelmervdl
jelmervdl / seed-cache.html
Created April 15, 2017 14:05
Geoserver Tile Cache seeding tool
<!DOCTYPE html>
<html>
<head>
<title>Seed tool</title>
<style>
.seed-status {
display: inline-block;
padding; 2px;
background: #ccc;
}
@drewchapin
drewchapin / HTML Application.hta
Last active June 9, 2022 02:23
Template for an HTML Application file (.hta), add to C:\Windows\ShellNew, and add ShellNew\Filename="HTML Application.hta" to .hta HKCR key.
<html>
<head>
<!--
@tag hta:application
@attribute ApplicationName Sets the name of the HTA.
@attribute Border [Thick]|Thin|None
@attribute BorderStyle [Normal]|Raised|Sunken|Complex|Static
@attribute Caption [Yes]|No
@citrusui
citrusui / dropdown.md
Last active May 15, 2024 01:34
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@chranderson
chranderson / nvmCommands.js
Last active May 15, 2024 03:16
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@zackad
zackad / ogr2ogr.sh
Last active March 9, 2021 20:03
ogr2ogr cheatsheet
# export mysql database into shapefile
ogr2ogr out_shapes MYSQL:gis,user=root,password=password
# import shapefile into mysql
ogr2ogr -f MySQL MySQL:database_name,user=root,password=password my_shapefile.shp -nln table_name -a_srs EPSG:4326 -update -overwrite -lco engine=MYISAM
# reproject spatial reference from WGS 84 UTM 48S to Geographic Lattitide/Longitude Coordinate System
ogr2ogr -f "ESRI Shapefile" target_file.shp source_file.shp -s_srs EPSG:32748 -t_srs EPSG:4326
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Ciantic
Ciantic / dirname-filename-basename.bat
Created April 1, 2016 15:11
How to get filename, dirname, and basename in bat?
set filepath="C:\some path\having spaces.txt"
for /F "delims=" %%i in (%filepath%) do set dirname="%%~dpi"
for /F "delims=" %%i in (%filepath%) do set filename="%%~nxi"
for /F "delims=" %%i in (%filepath%) do set basename="%%~ni"
echo %dirname%
echo %filename%
echo %basename%