Skip to content

Instantly share code, notes, and snippets.


Lerk lfuelling

View GitHub Profile
lfuelling / distro
Created Oct 28, 2021 — forked from riptidewave93/distro
LibreNMS /usr/bin/distro script
View distro
#!/usr/bin/env sh
# Detects which OS and if it is Linux then it will detect which Linux Distribution.
OS=$(uname -s)
REV=$(uname -r)
#MACH=$(uname -m)
if [ "${OS}" = "SunOS" ] ; then
ARCH=$(uname -p)
lfuelling / config
Created Oct 24, 2021
Jekyll NGINX Config
View config
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
server {
listen 443 ssl http2;
lfuelling / rfc.xml
Created Jun 27, 2021
Webstorm / IntelliJ Typescript React Arrow Function Template
View rfc.xml
<template name="rfc" value="import * as React from 'react';&#10;import { FunctionComponent } from 'react';&#10;&#10;type Props = {}&#10;&#10;const $TM_FILENAME_BASE$: FunctionComponent&lt;Props&gt; = () =&gt; {&#10; return (&#10; &lt;div&gt;&#10; $END$&#10; &lt;/div&gt;&#10; );&#10;}&#10;&#10;export default $TM_FILENAME_BASE$;&#10;" description="React arrow function component with generic props" toReformat="true" toShortenFQNames="true">
<variable name="TM_FILENAME_BASE" expression="capitalize(camelCase(fileNameWithoutExtension()))" defaultValue="" alwaysStopAt="false" />
<option name="TS_TOP_LEVEL_STATEMENT" value="true" />
lfuelling / DimensionLockingTableCell.tsx
Created Jun 20, 2021
If you use react-beautiful-dnd and are struggling with Atlassians prehistoric example code (wtf does @flow even mean, who still writes class components??) you might find this example component helpful. If you use this in a draggable row instead of td tags, this will make the table keep its dimensions when dragging.
View DimensionLockingTableCell.tsx
import React, {FunctionComponent} from "react";
type TableCellProps = {
children: unknown
const DimensionLockingTableCell: FunctionComponent<TableCellProps> = ({children}) => {
const ref = React.useRef<HTMLTableDataCellElement>(null);
lfuelling /
Created Apr 7, 2020
Data privacy statements for MeshTalk


This app is a messenger and thus has to connect to the internet to send and receive messages. The content of each message is only tranferred encrypted. The server the messages are send to has no way of decrypting any messages in a reasonable amount of time because there are no cleartext keys stored on the server.

The only type of key stored on the server are chat keys in handshakes. Those are encrypted with a user's key which is never transferred at all so the server also has no way to decrypt those chat keys.

Since users can set their own server in the settings, the developers of the app can't make any statement regarding the transport layer encryption used to connect to the server.

Aside from that, this app does not connect to the internet or collect any data on it's own.

lfuelling /
Created Feb 9, 2020
Generic Data Privacy Statement For Offline Apps On Google Play


This app does not connect to the internet or collect any data on it's own.

The exception of this is preferences the user sets or values the user enters. Those will be stored on the device and might get backuped to Google if this is configured. The backup has to be configured in the Android System settings.

This statement does not cover functionality that is provided by Google (eg. the PlayStore analytics).

lfuelling /
Last active May 7, 2020
Keybase Confirmation

I deleted keybase because it was aquired by zoom.

Money quote:

Ultimately Keybase's future is in Zoom's hands, and we'll see where that takes us.

lfuelling / halcyon.conf
Last active Jul 13, 2019
"jUsT uPlOaD AnD rUn iT"
View halcyon.conf
<VirtualHost *:80>
ServerName {{ halcyon_domain }}
Redirect permanent / https://{{ halcyon_domain }}/
Redirect permanent (.*) https://{{ halcyon_domain }}/
<VirtualHost *:443>
ServerName {{ halcyon_domain }}
lfuelling /
Created Jul 13, 2019
See all the available cows on your system!
cowsay -l | xargs -n 1 | tail -n +5 | while read line; do cowsay -f $line $line && sleep 1; done
lfuelling /
Last active Apr 25, 2018
macOS initial config
#!/usr/bin/env bash
# — Based on:
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v