Skip to content

Instantly share code, notes, and snippets.

View salahelfarissi's full-sized avatar
🚩
Focusing

Salaheddine EL FARISSI salahelfarissi

🚩
Focusing
View GitHub Profile
@salahelfarissi
salahelfarissi / settings.json
Last active July 5, 2023 08:22
Home Terminal Settings
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "paste",
"keys": "ctrl+v"
},
{
@salahelfarissi
salahelfarissi / config.js
Created February 17, 2023 15:35
APS Environment Variables
export const APS_MODEL_URN = 'dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dHVubmVsLWJ1Y2tldC9yYWNiYXNpY3NhbXBsZXByb2plY3QucnZ0';
export const APS_MODEL_VIEW = '6bfb4886-f2ee-9ccb-8db0-c5c170220c40';
export const APS_MODEL_DEFAULT_FLOOR_INDEX = 2;
export const DEFAULT_TIMERANGE_START = new Date('2022-01-01');
export const DEFAULT_TIMERANGE_END = new Date('2022-01-30');
"""
This script should be run from the Python consol inside QGIS.
It adds online sources to the QGIS Browser.
Each source should contain a list with the folowing items (string type):
[sourcetype, title, authconfig, password, referer, url, username, zmax, zmin]
You can add or remove sources from the sources section of the code.
Script by Klas Karlsson
@salahelfarissi
salahelfarissi / Flexbox Properties.txt
Created July 5, 2023 08:24
Flexbox Properties Cheat Sheet
Flexbox Properties
A complete version of these tips with image explanations and links is available at CSS Tricks:
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Parent (Flex Container)
display: flex | inline-flex;
flex-direction: row | row-reverse | column | column-reverse;
@salahelfarissi
salahelfarissi / DockerCLI.sh
Last active December 10, 2023 15:29
Docker CLI commands
# Get docker engine version
docker version
# List
docker ps # Only running containers
docker ps -a # Shutted containers as well
docker images -a # List images, including intermediary
# Remove
docker rm -f <container> # -f will kill then rm
# ? wmts
if MODE == "WMTS":
url = "https://data.geopf.fr/wmts"
layer = "LANDCOVER.CLC18_FR"
ogcc.METERS_PER_UNIT["EPSG:" + str(PROJ_CRS)] = 1
ogcc._URN_TO_CRS["EPSG:" + str(PROJ_CRS)] = ccrs.GOOGLE_MERCATOR
m.ax.add_wmts(url, layer, zorder=0.1)
# ? WMTS legend
ireland_wms = WebMapTileService("https://data.geopf.fr/wmts")