Skip to content

Instantly share code, notes, and snippets.

@emirpasic
emirpasic / main.go
Created September 13, 2021 08:27
Sample HTTP Server Golang
package main
import (
"encoding/json"
"net/http"
)
type input struct {
Word string `json:"word"`
Synonym string `json:"synonym"`
@emirpasic
emirpasic / ids.json
Created December 6, 2018 16:34
Geo- and data-tiles layers to be deleted by the cleaner
{
"geoTileLayersIdsToBeDeleted": [
13897,
13898,
13899,
13901,
13902,
13903,
13905,
13906,
Explanation of request_types
============================
Each method can be tagged as on of the following requests below, e.g.
get "login" => :new, :defaults => {:request_type => :page_request}
If request_type tag is omitted in the route, a default request type ":page_request" is assumed
:raw_request
~/Projects/omni/backend $ rake -T
rake backend:build # Build all backend services and workers
rake backend:deps # Install all backend dependencies
rake backend:list # List configured workers
rake backend:restart[environment] # Restart all services and workers
rake backend:running # List running workers
rake backend:start[environment] # Start all services and workers
rake backend:stop[environment] # Stop all services and workers
rake dbstack:clean[environment] # Clean DB stack
usage: java -jar shp_splitter [-?] [-shp <arg>]
Shapefile splitter. Splits shapefiles larger than 2GB in smaller ones
-?,--help Print this message
-shp,--shp-file <arg> Input shapefile with path (required)
usage: shp2csv [-?] [-csv <arg>] [-meta <arg>] [-shp <arg>]
Shapefile to CSV
-?,--help Print this message
-csv,--csv-file <arg> Output CSV file with path (required)
-meta,--meta-file <arg> Output metadata JSON file with path (optional)
-shp,--shp-file <arg> Input shapefile with path (required)
usage: dbf2csv [-?] [-csv <arg>] [-dbf <arg>] [-meta <arg>]
DBF to CSV
-?,--help Print this message
-csv,--csv-file <arg> Output CSV file with path (required)
-dbf,--dbf-file <arg> Input DBF file with path (required)
-meta,--meta-file <arg> Output metadata JSON file with path (optional)
usage: dataset_analyzer [-?] [-csv <arg>] [-imeta <arg>] [-ometa <arg>]
Dataset Analyzer
-?,--help Print this message
-csv,--csv-file <arg> CSV data file with path (required)
-imeta,--input-metadata-file <arg> Merges the output metadata with input metadata (optional)
-ometa,--output-metadata-file <arg> Output file path for metadata (required)
usage: data_tile_maker [-?] [-csv <arg>] [-dbf <arg>] [-meta <arg>] [-out <arg>]
Data Tile Maker
-?,--help Print this message
-csv,--csv-file <arg> CSV data file with path (optional: either csv or dbf)
-dbf,--dbf-file <arg> DBF data file with path (optional: either csv or dbf)
-meta,--meta-file <arg> Metadata file with path (required)
-out,--output-path <arg> Output path for data tiles (required)
usage: data_tile_maker [-?] [-csv <arg>] [-dbf <arg>] [-meta <arg>] [-out
<arg>]
Data Tile Maker
-?,--help Print this message
-csv,--csv-file <arg> CSV data file with path (optional: either csv or dbf)
-dbf,--dbf-file <arg> DBF data file with path (optional: either csv or dbf)
-meta,--meta-file <arg> Metadata file with path (required)
-out,--output-path <arg> Output path for data tiles (required)