docker run -d --name pg-postgis-nrp -p 5432:5432 -e PGDATA=/var/lib/postgresql/data/pgdata -v /gluster/postgis:/var/lib/postgresql/data postgis/postgis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.willowtreeapps.demo; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.KeyEvent; | |
import android.view.Window; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class MainActivity extends Activity { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pysftp | |
credentials = { | |
"host":'xx', | |
"username": 'xx', | |
"password": 'xx' | |
} | |
cnopts = pysftp.CnOpts() | |
cnopts.hostkeys = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timestamps : 2021/02/10 10:30:02 | |
level_error : [error] 1404#1404: *1 no live upstreams while connecting to upstream ( war | error | crit | emerg ) | |
client : 202.10.22.1 (Public ip client) | |
server : subdomain.domain.com (Server) | |
request : GET /checkout/cart/1 HTTP/1.1 (Request http) | |
upstream : http://localhost:8080/checkout/cart/1 (Example upstream nodejs) | |
host : localhost (Host server) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Radian | |
create or replace function misc_normalizeRadians(rad double precision) | |
returns double precision | |
as $$ | |
SELECT r-floor(r/pi())*(2*pi()) FROM (SELECT (floor(rad/(2*pi()))*-(2*pi())+rad) as r) as t; | |
$$ LANGUAGE sql immutable; | |
-- Heading by angle | |
create or replace function misc_rotateHeadingByAngle(heading double precision,angle double precision) | |
returns double precision |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo firewall-cmd --zone=public --add-port=5432/tcp --permanent | |
sudo firewall-cmd --reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
### TileBBox ### | |
Given a Web Mercator tile ID as (z, x, y), returns a bounding-box | |
geometry of the area covered by that tile. | |
__Parameters:__ | |
- `integer` z - A tile zoom level. | |
- `integer` x - A tile x-position. | |
- `integer` y - A tile y-position. | |
- `integer` srid - SRID of the desired target projection of the bounding | |
box. Defaults to 3857 (Web Mercator). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check checkpoint pg wal | |
pg_controldata -D /var/lib/postgresql/data/ | |
## | |
# Find this line | |
# Latest checkpoint's REDO WAL file: 000000010000000000000001 | |
# Check pg wal / Dryrun | |
pg_archivecleanup -n /var/lib/postgresql/data/ 000000010000000000000001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ARCHIVEDIR='/var/lib/pgsql/wal_archive' | |
LAST_BACKUP=$(ls -lto ${ARCHIVEDIR}) | |
FILE_LIST=$(pg_archivecleanup -n "${ARCHIVEDIR}" "${LAST_BACKUP}") | |
## TEST FIRST | |
pg_archivecleanup -n "${ARCHIVEDIR}" "${LAST_BACKUP}" | find -type f -mmin +30 | xargs ls -lh |
NewerOlder