Skip to content

Instantly share code, notes, and snippets.

View chris-redbeed's full-sized avatar
🌱
Working from home

Chris Schön chris-redbeed

🌱
Working from home
View GitHub Profile
@chris-redbeed
chris-redbeed / git-branch.sh
Created December 12, 2022 08:26
Create Git Branch based on Master, after reset.
#!/bin/bash
TXT_GREEN='\033[0;32m'
TXT_RED='\033[0;31m'
TXT_NC='\033[0m'
# Ask for continue
echo "This will reset all your local changes."
read -p "Are you sure you want to continue? (y/n) [y]" answer
answer=${answer:-y}
@chris-redbeed
chris-redbeed / debian-setup.sh
Last active October 19, 2020 13:13
Sets up and hardens an Debian Linux server.
# Arch Linux Setup: https://gist.github.com/kevinkub/46ce7229ee4f17be710ddd7c5a80a3c3
# Change root password
echo "# Change password of root user"
passwd
# Change hostname
echo "# Change hostname"
hostname
hostname $hostname
@chris-redbeed
chris-redbeed / UIColorToColor.swift
Last active March 6, 2024 22:05
SwiftUI - UIColor to Color
// Convert UIColor to Color
import SwiftUI
extension UIColor {
var color: Color {
get {
let rgbColours = self.cgColor.components
return Color(
red: Double(rgbColours![0]),