Skip to content

Instantly share code, notes, and snippets.

View kampar's full-sized avatar
🏠
Working from home

Muhammad Jazman kampar

🏠
Working from home
View GitHub Profile
@kampar
kampar / kantor_lurah.js
Created January 30, 2016 18:47
Kantor lurah di Kota Pekanbaru, dalam format GeoJSON
var kantor_lurah_84={
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Kelurahan": "Kantor Lurah Simpang Tiga" }, "geometry": { "type": "Point", "coordinates": [ 101.4557033136338, 0.469427328437212 ] } },
{ "type": "Feature", "properties": { "Kelurahan": "Kantor Lurah Tangkerang Labuai" }, "geometry": { "type": "Point", "coordinates": [ 101.47158909432399, 0.491438072161129 ] } },
{ "type": "Feature", "properties": { "Kelurahan": "Kantor Lurah Tangkerang Selata" }, "geometry": { "type": "Point", "coordinates": [ 101.45570861841688, 0.499368156595947 ] } },
{ "type": "Feature", "properties": { "Kelurahan": "Kantor Lurah Tangkerang Utara" }, "geometry": { "type": "Point", "coordinates": [ 101.46942149975804, 0.510550800783581 ] } },
{ "type": "Feature", "properties": { "Kelurahan": "Kantor Lurah Tanjung RHU" }, "ge
@kampar
kampar / L.geoJSON_sample_pekanbaru.html
Created January 30, 2016 19:18
Leaflet sample for geoJSON, using Kantor Kelurahan as Marker
<!DOCTYPE html>
<html>
<head>
<title>Leaflet GeoJSON Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<style>
html, body, #map{
@kampar
kampar / L.tileLayer_sample_ESRI_MapboxOSM.html
Created January 30, 2016 23:41
Leaflet TileLayer sample with ESRI and Mapbox OpenStreetMap
<!DOCTYPE html>
<html>
<head>
<title>Leaflet TileLayer Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<style>
html, body, #map{
@kampar
kampar / kelurahan.js
Created January 31, 2016 05:05
Kelurahan dalam bentuk GeoJSON dengan prop MhsSIF palsu, hanya untuk demo
var kelurahan={
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Kelurahan": "Kel. Pulau Karam", "x": 101.441162, "y": 0.522463, "Kecamatan": "Kec. Sukajadi", "MhsSIF": 31 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 101.44059390557534, 0.528427902332317 ], [ 101.44237149288369, 0.528405418998876 ], [ 101.44237149288369, 0.528405418998876 ], [ 101.44215388002235, 0.524567950551537 ], [ 101.44202731731933, 0.522384613688494 ], [ 101.44261723154085, 0.521551334364376 ], [ 101.44411730786527, 0.519195296642883 ], [ 101.44262662420395, 0.518251219192201 ], [ 101.44367168272008, 0.516522812981054 ], [ 101.44029518433507, 0.516603195372321 ], [ 101.44049617404967, 0.521748270515964 ], [ 101.44029518486332, 0.522391346390443 ], [ 101.44021475329306, 0.524240300341447 ], [ 101.44059390557534, 0.52842790
@kampar
kampar / Leaflet Choropleth Interaktif Pekanbaru.html
Last active July 28, 2019 10:23
Demonstrasi penggunaan Leaflet untuk pembuatan peta tematik / choropleth interaktif
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Layers Control Example (Pekanbaru)</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
@kampar
kampar / localStorage_bomb.html
Last active December 18, 2022 03:46
localStorage bomb to test your browser on how many characters your browser able to save
<html>
<head>
<title>M. Jazman, Fuse</title>
<meta charset="utf-8">
<script>
localStorage.setItem("fuse", "-");
while(true) {
var fuse = localStorage.getItem("fuse");
try {
@kampar
kampar / userAgent.txt
Created April 9, 2016 19:55
List of known User Agent string
Android
Nexus 7 (Tablet)
Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
Samsung Galaxy S3 (Handset)
Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
Samsung Galaxy Tab (Tablet)
@kampar
kampar / custom_legend.html
Created December 25, 2016 18:32
Google Maps API Sample for custom legend, modified as lecture material in GIS, here at UIN Suska
<!DOCTYPE html>
<html>
<head>
<title>Custom Legend</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body {
margin: 0;
padding: 0;
<!DOCTYPE html>
<html>
<head>
<title>Leaflet CDN - Black Marble</title>
<style>
html, body, #map{
height: 100%;
margin: 0px;
padding: 0px
}