Skip to content

Instantly share code, notes, and snippets.

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

Raul Jimenez Ortega hhkaos

🏠
Working from home
View GitHub Profile
@hhkaos
hhkaos / readme.md
Last active July 25, 2023 22:30
OGC certified products
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ArcGIS REST JS</title>
<style>
body {
font-family: monospace;
color: white;
@hhkaos
hhkaos / wordpress-tags-to-csv.js
Last active May 7, 2022 14:35
Code to extract all tags used in Wordpress articles to CSV
/*
Run this from your Google Console at https://your-domain.com/wp-admin/edit.php
Double check if '#post_tag option' is the right selector
*/
var regExp = /\(([^)]+)\)$/;
var x= [];
document.querySelectorAll('#post_tag option').forEach(el => {
var matches = regExp.exec(el.innerHTML);
@hhkaos
hhkaos / Query related records.md
Created February 15, 2022 15:14
ArcGIS Online query related records workflow
@hhkaos
hhkaos / relatedItems-response.json
Created February 15, 2022 14:30
ArcGIS spec examples
{
"total": 1,
"relatedItems": [{
"id": "586e796f22724c719daa78e484a8c6eb",
"owner": "Blue.Flag",
"created": 1559808052000,
"isOrgItem": true,
"modified": 1559808053000,
"guid": "887796F5-A9F2-44A3-B657-781CA0A65FF3",
"name": "Best_Practices_WFL1.sd",
@hhkaos
hhkaos / Address Selection.html
Created February 1, 2022 10:27
GMaps Platform: Solution Library
<!DOCTYPE html>
<html>
<head>
<title>Address Selection</title>
<style>
body {
margin: 0;
}
.sb-title {
@hhkaos
hhkaos / get-playlist-ids-titles.js
Created October 20, 2021 15:40
Get titles and IDs from a YouTube
// Script to get video titles and links from a YT playlist
// https://www.youtube.com/playlist?list=PLAYLIST_ID
data = []
function youtube_parser(url){
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;
var match = url.match(regExp);
return (match&&match[7].length==11)? match[7] : false;
}
document.querySelectorAll("a#video-title").forEach((el,i) => {
let videoId = youtube_parser(el.href)
@hhkaos
hhkaos / script.md
Last active August 22, 2021 16:53
Geospatial data script
@hhkaos
hhkaos / script.md
Last active May 1, 2024 17:28
From Zero to Newbie with ArcGIS API for JS and TypeScript

From zero to newbie with ArcGIS API for JS and TS.

Hello TypeScript demo

Initialize a typescript project:

npm init -y
npm i typescript --save-dev
@hhkaos
hhkaos / countries.geojson
Created July 8, 2021 18:35
countries.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.