Skip to content

Instantly share code, notes, and snippets.

View Lowess's full-sized avatar
💭
👑🥕

Florian Dambrine Lowess

💭
👑🥕
View GitHub Profile
@Lowess
Lowess / DatabricksPushgatewayExporter.py
Last active March 14, 2024 10:26
Databricks Prometheus Integration
import os
import threading
import urllib.request
import logging
from time import sleep
__author__ = "Florian Dambrine <android.florian@gmail.com>"
class DatabricksPushgatewayExporter:
"""
[{{ build.status }}] {{ repo.owner }}/{{ repo.name }} ({{ commit.branch }} - {{ truncate commit.sha 8 }})
@Lowess
Lowess / .pre-commit-config.yaml
Last active September 23, 2023 11:34
Jinja2 template to auto-generate atlantis.yaml for Atlantis / Terraform & pre-commit action & shell script
repos:
- repo: https://github.com/lowess/pre-commit-hooks
rev: v1.2.0 # Get the latest from: https://github.com/lowess/pre-commit-hooks/releases
hooks:
- id: jinja2-render-template
name: Render atlantis.yaml configuration
args:
- atlantis.j2
- --output
- atlantis.yaml
@Lowess
Lowess / Makefile - Help
Created August 2, 2022 06:58
Makefile - Tips & tricks
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@Lowess
Lowess / 404
Last active March 19, 2022 10:12
404 Static Pages
# Fun 404 Web Pages
* Mario
* No Signal
@Lowess
Lowess / helmfile-ops-layout
Last active December 16, 2021 15:13
Helmfile & GitOps Medium Blogpost
<repo>
├── Makefile
├── README.md
├── common.yaml
├── environments.yaml
├── helmfile.yaml
└── releases
└── ops
├── argo-cd
│ ├── helmfile.yaml
@Lowess
Lowess / Lang.xml
Created February 17, 2021 16:37
Beersmith 3 - French language file
<Database><_BaseKey>126754</_BaseKey>
<Strings><_MOD_>2011-09-11</_MOD_>
<Name>Strings</Name>
<Type>3505</Type>
<Owndata>0</Owndata>
<TID>3505</TID>
<Size>893</Size>
<_XName>Strings</_XName>
<Allocinc>16</Allocinc>
<Data><String><_MOD_>2011-09-11</_MOD_>
@Lowess
Lowess / transpiled.html
Created January 7, 2021 17:50
Hugo JS Pipes
<!-- Transipiling JS code with Babel and Node -->
{{- $transpiled := resources.Get "scripts/index.js" | babel | js.Build (dict "minify" true) -}}
<script src="{{ $transpiled.Permalink }}"></script>
@Lowess
Lowess / AmplifyAuth.js
Last active December 17, 2020 14:08
Amplify authentication written in functional Preact using hooks
import { h } from 'preact';
import { useState, useEffect, useContext } from 'preact/hooks';
import { Hub } from '@aws-amplify/core';
import { Auth } from '@aws-amplify/auth';
import { UserContext } from '../contexts/UserContext';
const AmplifyAuth = () => {