Skip to content

Instantly share code, notes, and snippets.


Shoaib Burq sabman

View GitHub Profile
sabman /
Last active Dec 29, 2020 — forked from wunki/
Unique character check in Rust
use std::os;
fn unique_chars(s: &str) -> bool {
let v: Vec<char> = s.chars().collect();
let mut y = v.clone();
v.len() == y.len()
sabman / index.html
Last active Dec 8, 2020 — forked from andrewbt/index.html
Get named map layers from CARTO
View index.html
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Load a public CARTO Builder URL dynamically</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src=""></script>
<link href="" rel="stylesheet" />
body { margin:0; padding:0; }
sabman / d3map.css
Created May 7, 2020 — forked from emeeks/d3map.css
City Nature Neighborhoods
View d3map.css
path,circle,rect,polygon,ellipse,line {
vector-effect: non-scaling-stroke;
svg, canvas {
top: 0;
#d3MapZoomBox {
position: absolute;
z-index: 10;
height: 100px;
sabman / L.CanvasOverlay.js
Created May 7, 2020 — forked from Sumbera/L.CanvasOverlay.js
Leaflet Canvas Overlay
View L.CanvasOverlay.js
UPDATE July 2016 , moved and updated to here:
Generic Canvas Overlay for leaflet,
Stanislav Sumbera, April , 2014
- added userDrawFunc that is called when Canvas need to be redrawn
- added few useful params fro userDrawFunc callback
- fixed resize map bug
inspired & portions taken from :
View Nginx conf for multiple Streamlit Apps
worker_processes 1;
events {
worker_connections 1024;
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
sabman /
Created Mar 19, 2020 — forked from rclark/
Leaflet WMS + GetFeatureInfo

There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request:

  1. You have to rely on an AJAX request, this example uses jQuery
  2. To make a GetFeatureInfo request, you must provide a BBOX for a image, and the pixel coordinates for the part of the image that you want info from. A couple of squirrely lines of Leaflet code can give you that.
  3. Output formats. The info_format parameter in the request. We don't know a priori which will be supported by a WMS that we might make a request to. See Geoserver's docs for what formats are available from Geoserver. That won't be the same from WMS to WMS, however.
  4. WMS services return XML docs when there's a mistake in the request or in processing. This sends an HTTP 200, which jQuery doesn't think is an error.
View BerlinFeatures.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View BerlinWGS84Geom.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Drought Communities Program eligible councils.csv
LGA_code Council Name
10130 Armidale Regional
10850 Blayney
10950 Bogan
11150 Bourke
11200 Brewarrina
11250 Broken Hill
11400 Cabonne
11700 Central Darling
11750 Cobar
View MOCK_DATA.csv
first_name last_name email gender ip_address
Lauri Luddy Female
Arline Schmidt Female
Jorgan Siss Male
Pascale Jagg Male
Karmen Kuhnert Female
Romeo Ranscome Male
Duffie Petkens Male
Angeline Raulin Female
Camel Felce Female