Skip to content

Instantly share code, notes, and snippets.

@adam-zethraeus
adam-zethraeus / Bash.swift
Created December 25, 2023 09:57 — forked from andreacipriani/Bash.swift
Execute shell/bash commands from Swift
import UIKit
protocol CommandExecuting {
func run(commandName: String, arguments: [String]) throws -> String
}
enum BashError: Error {
case commandNotFound(name: String)
}
@adam-zethraeus
adam-zethraeus / .zshrc
Created June 11, 2023 21:17 — forked from tanzeeb/.zshrc
vi-mode cursors with zsh + starship
eval "$(starship init zsh)"
function _cursor_block() { echo -ne '\e[1 q' }
function _cursor_bar() { echo -ne '\e[3 q' }
function _cursor_beam() { echo -ne '\e[5 q' }
function zle-keymap-select zle-line-init
{
case $KEYMAP in
vicmd) _cursor_block;;
@adam-zethraeus
adam-zethraeus / vpn.sh
Last active January 8, 2022 22:46 — forked from skrajewski/README.md
A cli for launching/stopping Global Protect (and stopping it from auto-launching on restart)
#!/bin/bash
function setup() {
sudo mv /Library/LaunchDaemons/com.paloaltonetworks.gp.pangpsd.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/
sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/
sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/
}
function up() {