Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Jesuiter bjesuiter

View GitHub Profile
@bjesuiter
bjesuiter / default.conf
Created Jul 13, 2021
Multi-SPA Nginx Config
View default.conf
server {
listen 8080;
server_name localhost;
# Logging Settings
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /usr/share/nginx/www/;
index index.html;
@bjesuiter
bjesuiter / awesome-macos-tools.md
Last active Jul 10, 2021
Awesome MacOS Tools
View awesome-macos-tools.md

Awesome MacOS Tooling

Problems with 4K 60Hz Monitor?

Use SwitchResX Tool! https://www.madrau.com/

Control Brightness of external Monitors

Full bootable Backups

View gist:5c7b882fa71f0b15186aa5714cd0f419
# 'Res-Params' - Get a list of all params after a finite amout of params
# For Example: Collect all params after %1 to pass them to another cli.
set param_1=%1
for /f "tokens=1,* delims= " %%a in ("%*") do set ALL_BUT_FIRST_PARAM=%%b
echo "Call Some other cli with the rest of the params: %ALL_BUT_FIRST_PARAM%"
# For Example: call %CMDER_ROOT%\opt\.wapm\wapm_packages\.bin\%command% %ALL_BUT_FIRST%
@bjesuiter
bjesuiter / box-reset.css
Created Jun 25, 2021
Awesome CSS Tricks
View box-reset.css
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
@bjesuiter
bjesuiter / linux-on-mbp15-2016.md
Last active Jun 10, 2021
Linux on MacBook Pro Late 2016
View linux-on-mbp15-2016.md

Linux on MacBook Pro Late 2016

General Stuff

MX Linux "Advanced Hardware Edition (AHS)

  • Default: native Auflösung des MBP Bildschirms
  • Trackpad geht
  • Touchbar geht nicht (aber wahrscheinlich weil gerade kein funktionierendes MacOS drauf ist
  • externer LAN Adapter geht, aber nur, wenn schon bei Boot angeschlossen (kein Hotplug)
@bjesuiter
bjesuiter / personal-awesome-list.md
Last active Jan 3, 2022
Personal Awesome List bjesuiter
View personal-awesome-list.md
@bjesuiter
bjesuiter / demo.md
Created Jan 16, 2021
Typora - Useful Math Blocks
View demo.md

Typora - Useful Math Blocks

Multiple Calculation Lines aligned at '='

Explanation:

  • the \begin{align*} and \end{align*} commands start an alignment block
  • all lines with &= will be aligned to the Positioon of &= in the first line
$$
@bjesuiter
bjesuiter / demo.component.ts
Created Nov 24, 2020
How to get static data of activeRoute from route definition
View demo.component.ts
class DemoComponent () {
constructor(
private router: Router,
) {
this.router.events
.pipe(
filter((event) => event instanceof NavigationEnd),
map(() => this.router.routerState.root),
map((route) => {
@bjesuiter
bjesuiter / _aliase.sh
Last active Jul 23, 2020
Shell-based build scripting environment with aliases
View _aliase.sh
#!/bin/bash
###
# This file can be sourced from a development shell (for example in VSCode)
# to make shortcut commands available for the project.
# This is kind of like your local build script system for each developer.
#
# This file should NOT be checked into version control!
# This file should contain shortcuts to other scripts with specialized settings, which are distinct for each developer.
#
@bjesuiter
bjesuiter / ssh-keyggen.sh
Last active Feb 20, 2021
SSH Best Practice Keygen Commands
View ssh-keyggen.sh
# Use RSA 4096 or Ed25519 (if supported), for more details, see: https://goteleport.com/blog/comparing-ssh-keys/
ssh-keygen -t rsa -b 4096
ssh-keygen -t rsa -b 4096 -N [new passphrase (if wanted)]
ssh-keygen -t ed25519
# Interactive Input:
# - Name for private key: for example bjesuiter@zephir-mbp-15
# - Password for private key: save in JB_SSH.kdbx
# Set Key Permission (when copied into ~/.ssh from outside