Skip to content

Instantly share code, notes, and snippets.

@coco-napky
coco-napky / hyper.js
Created March 8, 2017 23:21
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@essoen
essoen / web.xml
Last active May 6, 2022 04:05
CORS * for GeoServer with Tomcat add following to `/var/lib/tomcat7/webapps/geoserver/WEB-INF/web.xml`
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
@iamtekeste
iamtekeste / Download Google Drive files with WGET
Created July 8, 2015 11:00
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
@antoniolocandro
antoniolocandro / WGS-Area-km2
Created December 5, 2013 15:50
Calculate area of polygon in GCS WGS 84 in Km2 using POSTGIS ST_Area
-- Calculate Km2 of a polygon stores in GCS WGS84
-- by default ST_Area returns the calculation in meters so the appropriate conversion was applied
-- fir_area_20131205 was the example table used
-- the spatial data was in a geom field so geom::geography was added
SELECT ST_Area(geom::geography)/1000000 as sqKM from fir_area_20131205