Skip to content

Instantly share code, notes, and snippets.

Avatar
🙃
hihihaha

soiqualang

🙃
hihihaha
View GitHub Profile
@soiqualang
soiqualang / proxy.php
Created Mar 18, 2022
File Proxy đơn giản
View proxy.php
<?php
$ch = curl_init($_GET['url']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
?>
@soiqualang
soiqualang / README.md
Created Aug 15, 2021 — forked from FMCorz/README.md
Adminer with SQLite no-login
View README.md

Adminer setup

Enables plugins, and SQLite no-login.

Instructions

  1. Copy index.php to a new directory
  2. Download Adminer to adminer.php
@soiqualang
soiqualang / postgis2shp.py
Created Aug 6, 2021 — forked from justinlewis/postgis2shp.py
A simple script for converting PostGIS tables to shapefiles with ogr2ogr.
View postgis2shp.py
#### Author: Justin Lewis
#### This script can be used to export a single pg table to shapefile.
####
#### Developed in a linux environment but should require minimal modification to run on other platforms.
####
#### Dependancies:
###### fwtools (gdal > ogr2ogr), PostGIS database, Python, PyGreSQL
import os, _pg
View docker-on-android.md

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@soiqualang
soiqualang / calc1.sh
Created May 11, 2021
Linux bash shell addition, subtraction, multiplication and division
View calc1.sh
#!/bin/bash
# read -s -p "Enter Password: " pswd
read -p "Enter Num 1: " num1
read -p "Enter Num 2: " num2
# Phép cộng
kq=$(($num1 + $num2))
echo "Kết quả phép cộng:" $kq
# Phép trừ
kq=$(($num1 - $num2))
@soiqualang
soiqualang / osgeo_compile.sh
Created Apr 29, 2021 — forked from robinkraft/osgeo_compile.sh
compile and install GEOS, PROJ4 and GDAL from source on Ubuntu 12.0.4
View osgeo_compile.sh
# Compile/install GEOS. Taken from:
# http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GEOS_2
cd /tmp
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
bunzip2 geos-3.4.2.tar.bz2
tar xvf geos-3.4.2.tar
cd geos-3.4.2
@soiqualang
soiqualang / selenium.py
Created Apr 16, 2021 — forked from korakot/selenium.py
Use selenium in Colab
View selenium.py
# install chromium, its driver, and selenium
!apt update
!apt install chromium-chromedriver
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
View HTML table.MD

HTML table

Chỉnh width="200px" lại kích thước mong muốn Chỉnh path ảnh 1path ảnh 2 đến ảnh muốn chèn

<table >
	<tbody>
 
@soiqualang
soiqualang / Get feature info for each layer - L.TileLayer.BetterWMS.MD
Created Apr 8, 2021
Get feature info for each layer - L.TileLayer.BetterWMS.js
View Get feature info for each layer - L.TileLayer.BetterWMS.MD

Get feature info for each layer - L.TileLayer.BetterWMS.js

showGetFeatureInfo: function(err, latlng, content){
    // alert(this.wmsParams.layers);
    var lyr=this.wmsParams.layers;
    if(lyr=='sinhthai:rung_1980' || lyr=='sinhthai:rung_1990' || lyr=='sinhthai:rung_2000' || lyr=='sinhthai:rung_2010' || lyr=='sinhthai:rung_2018'){
      var res_obj = JSON.parse(content);
      var code=res_obj.features[0].properties.PALETTE_INDEX;
 // raster2info(code,this.wmsParams.layers);
@soiqualang
soiqualang / GEE - Extract value from image.js
Last active Mar 12, 2021
GEE - Extract value from image
View GEE - Extract value from image.js
var img = ee.Image('LANDSAT/LC08/C01/T1/LC08_044034_20140318');
var dem = ee.Image('USGS/SRTMGL1_003');
var arr1 = ee.FeatureCollection(ee.List([]));
var xy = ee.Geometry.Point([86.9250, 27.9881]);
var p1 = ee.Geometry.Point([142.36083984375, -37.466138602344046])
var p2 = ee.Geometry.Point([143.23974609375, -37.04640889969956])
var pts = ee.FeatureCollection(ee.List([ee.Feature(p1),ee.Feature(p2)]))