Skip to content

Instantly share code, notes, and snippets.

Avatar
⚠️
thisisunsafe

Lerk lfuelling

⚠️
thisisunsafe
View GitHub Profile
@lfuelling
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" />
<context>
<option name="TS_TOP_LEVEL_STATEMENT" value="true" />
</context>
</template>
@lfuelling
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
lfuelling / PRIVACY.md
Created Apr 7, 2020
Data privacy statements for MeshTalk
View PRIVACY.md

Privacy

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
lfuelling / PRIVACY.md
Created Feb 9, 2020
Generic Data Privacy Statement For Offline Apps On Google Play
View PRIVACY.md

Privacy

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
lfuelling / keybase.md
Last active May 7, 2020
Keybase Confirmation
View keybase.md

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
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>
<VirtualHost *:443>
ServerName {{ halcyon_domain }}
@lfuelling
lfuelling / showCows.sh
Created Jul 13, 2019
See all the available cows on your system!
View showCows.sh
#!/bin/bash
cowsay -l | xargs -n 1 | tail -n +5 | while read line; do cowsay -f $line $line && sleep 1; done
@lfuelling
lfuelling / mac.sh
Last active Apr 25, 2018
macOS initial config
View mac.sh
#!/usr/bin/env bash
# mac.sh — Based on: https://mths.be/macos
# 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
@lfuelling
lfuelling / spectre.c
Created Jan 8, 2018 — forked from ErikAugust/spectre.c
Spectre example code
View spectre.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@lfuelling
lfuelling / Dockerfile
Last active Feb 9, 2017
dradis-ce Dockerfile (alpha)
View Dockerfile
FROM ruby:2.2
##
# Docker image for Dradis-ce.
# This is NOT the final version!
##
MAINTAINER Lukas Fülling (lukas@k40s.net)
# Install dependencies using apt