Skip to content

Instantly share code, notes, and snippets.

View StephanPartzsch's full-sized avatar

Stephan Partzsch StephanPartzsch

View GitHub Profile
@porras
porras / .bash_profile
Created June 25, 2013 08:29
Changing terminal color in MacOSX when SSHing
# Changing terminal color in MacOSX when SSHing (so you know at a glance that you're no longer in Kansas)
# Adapted from http://www.rngtng.com/2011/01/14/mac-os-x-terminal-visual-indication-for-your-ssh-connection/
# 1. Create a theme in your terminal setting with the name "SSH" and the desired colors, background, etc.
# 2. Add this to your .bash_profile (or .bashrc, I always forget the difference ;))
# 3. Optional but useful: in the terminal, go to Settings > Startup and set "New tabs open with" to
# "default settings" (otherwise, if you open a new tab from the changed one, you get a local tab with
# the SSH colors)
function tabc() {
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi # if you have trouble with this, change
@Sherlouk
Sherlouk / DebugDevice.swift
Last active December 10, 2023 19:24
Debug Profiles - Securely debugging in production
//
// DebugDevice.swift
//
// Copyright 2022 • Sidetrack Tech Limited
//
import Foundation
// This must be called on the main-thread.
var isDebugProfileInstalled: Bool {
@chriseidhof
chriseidhof / ContentView.swift
Last active March 27, 2024 19:14
Variadic Views
import SwiftUI
struct MyValue: _ViewTraitKey {
static var defaultValue: Int = 0
}
extension View {
func myValue(_ value: Int) -> some View {
_trait(MyValue.self, value)
}
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #