Skip to content

Instantly share code, notes, and snippets.

View flipsi's full-sized avatar

Philipp Moers flipsi

View GitHub Profile
@flipsi
flipsi / latex-brief-vorlage.tex
Created May 23, 2024 08:47
Latex Briefvorlage
% Author: Philipp Moers <soziflip@gmail.com>
%
% Latex Brief-Vorlage
%
% ------------------------------------------------------------------------------
\documentclass
[
fontsize=12pt, % Schriftgröße
version=last, % Neueste Version von KOMA-Skript verwenden
@flipsi
flipsi / netctl-profile
Last active August 7, 2023 11:57
netctl Wifi profile with PEAP
Description='netctl profile'
Interface=wlan0
Connection=wireless
Security=wpa-configsection
IP=dhcp
WPAConfigSection=(
'ssid="SSID"'
'proto=RSN'
'key_mgmt=WPA-EAP'
@flipsi
flipsi / notes.md
Last active July 24, 2020 11:11
ZIO vs. Cats IO - Functional Programming libraries in Scala.

ZIO vs. Cats IO - Functional Programming libraries in Scala

Last updated on 2020-07-24 13:07

OKRs Q3 2020 Key result: "I have decided between ZIO or Cats IO (or similar) and justified this decision."

This document is a wrap-up of my research on which Functional Programming library to use in Scala.

@flipsi
flipsi / wait-for-tcp.sh
Created May 24, 2019 13:28
Wait for TCP - Delay command execution until TCP port is ready
#!/bin/sh
set -e
print_usage_and_exit() {
echo "This script performs a given command as soon as a TCP port is open."
echo "Usage: $0 <host> <port> <command>"
exit 2
}
@flipsi
flipsi / promiseBulk.js
Created July 1, 2017 23:00
Javascript Promises Chained
function gimmeAPromiseWith(x) {
return new Promise(function(resolve, reject) {
console.log(`started calculation of ${x}`);
setTimeout(function() {
resolve(x);
console.log(`finished calculation of ${x}`);
}.bind(this), 10);
});
}
@flipsi
flipsi / sfliptex05.tex
Created February 2, 2017 00:16
LaTeX Stuff (sfliptex05)
% Author: Philipp Moers <soziflip+latex@gmail.com>
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman, english]{babel}
% document: \selectlanguage{ngerman}
@flipsi
flipsi / jquery-fallback.html
Last active September 21, 2016 12:35
jQuery from CDN with localhost fallback
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script>!window.jQuery && document.write('<script src="lib/jquery-3.1.0.min.js"><\/script>')</script>
@flipsi
flipsi / cwd.sh
Created April 15, 2016 10:51
Shellscripting: cd to path of script itself
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $CURRENT_DIR
cd $CURRENT_DIR
touch foobarbaz
@flipsi
flipsi / browser.html
Created December 22, 2015 00:13
Guess the browser with JavaScript
<!DOCTYPE html>
<html>
<head>
<title>browser</title>
</head>
<body>
<script type="text/javascript">
var nVer = navigator.appVersion;
@flipsi
flipsi / getWifiInterface.py
Created December 21, 2015 23:51
Determine name of Wifi interface with Python
#!/usr/bin/python3
# -*- coding: utf-8 -*-
try:
from netifaces import interfaces
except ImportError:
print("The python package netifaces is required.")
print("You can install it from the PyPI with ``pip install netifaces''.")
exit(1)