Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
👑🥕

Florian Dambrine Lowess

💭
👑🥕
View GitHub Profile
@Lowess
Lowess / DatabricksPushgatewayExporter.py
Last active Jun 29, 2021
Databricks Prometheus Integration
View DatabricksPushgatewayExporter.py
import os
import threading
import urllib.request
import logging
from time import sleep
__author__ = "Florian Dambrine <android.florian@gmail.com>"
class DatabricksPushgatewayExporter:
"""
@Lowess
Lowess / Lang.xml
Created Feb 17, 2021
Beersmith 3 - French language file
View Lang.xml
<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_>
View transpiled.html
<!-- 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 Dec 17, 2020
Amplify authentication written in functional Preact using hooks
View AmplifyAuth.js
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 = () => {
View keybase.md

Keybase proof

I hereby claim:

  • I am lowess on github.
  • I am lowess (https://keybase.io/lowess) on keybase.
  • I have a public key ASC-gBD_TaZM1Pa5crVba7Tr2mgoVdj8sAoaRci3NukWfgo

To claim this, I am signing this object:

@Lowess
Lowess / .pre-commit-config.yaml
Last active Jun 12, 2020
Jinja2 template to auto-generate atlantis.yaml for Atlantis / Terraform & pre-commit action & shell script
View .pre-commit-config.yaml
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 / prepare-commit-msg.output
Last active Mar 4, 2020 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
View prepare-commit-msg.output
(MLE-297-Fix-naming-for-prometheus) $ ./prepare-commit-msg.sh 'Fix featureA in controller'
[MLE-297] Fix featureA in controller
@Lowess
Lowess / Systemd-Raspberry-Chromium
Created Mar 28, 2019
Unit file for Raspberry Chromium at boot on Raspbian 9.x
View Systemd-Raspberry-Chromium
[Unit]
Description=launch chromium
[Service]
User=pi
Environment=DISPLAY=:0
ExecStart=/usr/bin/chromium-browser --kiosk --disable-session-crashed-bubble 127.0.0.1
[Install]
WantedBy=user@.service
@Lowess
Lowess / au20.ini
Created Jan 10, 2019 — forked from Baael/au20.ini
alfawise u20 for Cura 15.04 profile
View au20.ini
[profile]
layer_height = 0.2
wall_thickness = 1.2
retraction_enable = True
solid_layer_thickness = 1.2
fill_density = 20
print_speed = 50
print_temperature = 210
print_temperature2 = 0
print_temperature3 = 0
View how_to_reset_kafka_consumer_group_offset.md

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)