Skip to content

Instantly share code, notes, and snippets.

View MarcAlx's full-sized avatar
🌱

MarcAlx MarcAlx

🌱
View GitHub Profile
@MarcAlx
MarcAlx / NOTE.md
Created October 17, 2025 12:55
ArcGIS Experience Builder Developer Edition : Instantiate/Create widget from custom widget code

Notes

  1. Creating a widget consist in adding a json config inside app (current experience) config.
  2. Widget config must exist in a layout, thus layout must exist inside a the layout of the wished page.
  3. This can't be done from settings.tsx, must be done from your widget code. settings.tsx code doesn't see the same app config as widget code.
@MarcAlx
MarcAlx / anonymize.py
Last active October 2, 2025 08:12
ArcPy Feature Class anonymizer
# script to anonymize attributes and geometry of a feature class
#
# /!\ String anonymization is light and based on MD5, use only for visual hidding not for security!
# /!\ assumes SR are in meters like 102110/2154
#
# To run:
# & 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' .\arcgis-anonymizer.py
import arcpy
@MarcAlx
MarcAlx / DateTimePicker.cs
Last active July 12, 2024 15:02
DateTime Picker MAUI
using System.Windows.Input;
using Microsoft.Maui.Controls;
namespace SO.Commons.MultiPlatform.Views.Controls;
/// <summary>
/// Wrapper arround a DatePicker and a TimePicker to create a DateTimePicker
///
/// Design is mean't to be overrided via ControlTemplate see: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/controltemplate
///
@MarcAlx
MarcAlx / README.md
Last active October 30, 2025 08:30
MAUI RangeSlider
@MarcAlx
MarcAlx / GetFile.pyt
Last active April 12, 2023 14:36
Arcpy geoprocessing / web tool that outputs a file.
# -*- coding: utf-8 -*-
import arcpy
from os.path import join
class Toolbox(object):
def __init__(self):
"""Sample file toolbox"""
self.label = "Sample file toolbox"
self.alias = "File toolbox"
@MarcAlx
MarcAlx / server.py
Created September 14, 2022 09:47
local https python server with cors enabled
#!/usr/bin/env python3
from http.server import HTTPServer, SimpleHTTPRequestHandler
import ssl
import sys
class CORSRequestHandler (SimpleHTTPRequestHandler):
def end_headers (self):
self.send_header('Access-Control-Allow-Origin', '*')
SimpleHTTPRequestHandler.end_headers(self)
@MarcAlx
MarcAlx / Playground.swift
Last active June 28, 2022 09:36
Apple music animated bars - SwiftUI - Swift Playground
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
Bars()
}
}
struct Bars:View {
@MarcAlx
MarcAlx / Xamarin Forms libraries.md
Last active March 2, 2021 09:03
Xamarin Forms usefull libraries
@MarcAlx
MarcAlx / notification.py
Last active December 11, 2024 15:24
Send Windows notifications from python3
# -*- coding: utf-8 -*-
# Created by Marc_Alx
#
# pip install winrt
# Documentation here : https://github.com/Microsoft/xlang/tree/master/src/package/pywinrt/projection
# NB Only works with version of Windows that supports 'windows.ui.notifications'
#
# Requirements
# Windows 10, October 2018 Update or later.
# Python for Windows, version 3.7 or later
@MarcAlx
MarcAlx / Main.cs
Created January 15, 2019 17:03
Unity Scene to Equirectangular png (spherical image)
/*
* This script produces a .png image from an Unity scene.
*
* Result image looks like this : https://fr.wikipedia.org/wiki/Fichier:Paris_s%27éveille_equirectangular_panorama.jpg
*
* inspired from : https://docs.unity3d.com/ScriptReference/RenderTexture.ConvertToEquirect.html
* and https://docs.unity3d.com/ScriptReference/Camera.RenderToCubemap.html
*
* To use it add this script to your scene then run
*/