Skip to content

Instantly share code, notes, and snippets.

View tbrettschneider's full-sized avatar
🏡
Working from home

Tommy Brettschneider tbrettschneider

🏡
Working from home
  • DEVICE INSIGHT GmbH
  • Munich
View GitHub Profile
@designrubenz
designrubenz / README.md
Last active September 30, 2021 23:14
Neuen SSH-Key auf Hetzner-Server hinterlegen
  1. neues SSH keypair generieren (s. github-Doku )
  2. Dann in der robot-Oberfläche:
  • rescue-System aktivieren (Passwort notieren)
  • Server restart
  • auf Server per SSH/rescue-Passwort zugreifen
  • Server-Partition mounten! (sonst befindet man sich nur auf der Partition des Rescue-Systems) (s. hetzner-Doku )
  • neue Keys hinterlegen (z.B. in /root/.ssh/authorized_keys)
  • Server restart
@sandor-nemeth
sandor-nemeth / PropertyLogger.java
Last active June 6, 2024 08:17
Spring Boot - Log all configuration properties on application startup
package io.github.sandornemeth.spring;
import java.util.Arrays;
import java.util.stream.StreamSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.core.env.AbstractEnvironment;
@dleonard00
dleonard00 / explode-opvn.sh
Created January 15, 2017 07:31
extract the certificate and key from an .ovpn file
#!/bin/bash
# This script will extract the certificate and key from an .ovpn file
# into their own files, which makes it possible to use them to configure
# the VPN using Ubuntu's network manager
# Usage example:
# >> ovpnconvert username.dev.ovpn
# You can keep following these instructions here:
@QuantumGhost
QuantumGhost / example.puml
Last active September 21, 2024 19:19
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@bocharsky-bw
bocharsky-bw / upgrade.sh
Last active October 17, 2024 09:02
Shell Script for Upgrade Ubuntu via APT in one step
#!/bin/bash
TEXT_RESET='\e[0m'
TEXT_YELLOW='\e[0;33m'
TEXT_RED_B='\e[1;31m'
sudo apt-get update
echo -e $TEXT_YELLOW
echo 'APT update finished...'
echo -e $TEXT_RESET
@fhemberger
fhemberger / backup-uberspace.exclude
Created October 17, 2013 08:52
How to easily backup your Uberspace (http://uberspace.de) account with rsync
.gem
.npm
cgi-bin
fcgi-bin
html
lib
man
share
tmp
**/node_modules