Skip to content

Instantly share code, notes, and snippets.

View segabor's full-sized avatar

Gábor Sebestyén segabor

View GitHub Profile
@j0ju
j0ju / RK1-boot-to-eMMC.sh
Last active February 17, 2025 00:20
Script to force boot a RK1 equipped with Uboot/Ubuntu 24.04 to eMMC
#!/bin/sh
set -e
set -x
# this needs, coreutils-stty, pppd-chat and minicom installed
# minicom needs proper config files in either /etc/{1..4}.minirc
# pointing to the correct device
case "${1:-}" in
[1234] ) NODE="$1" ;;
@kconner
kconner / macOS Internals.md
Last active April 19, 2025 12:52
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

##############
### Prepare for env variables
export NS_NAME=spark-ext
export SA_NAME=spark
export CLN_NAME=spark-client
export POD_IMAG=gcr.io/spark-operator/spark-operator:v1beta2-1.2.3-3.1.1
export SVC_NAME=$CLN_NAME-headless
export SVC_PORT=19987
export CLS_ENDP="https://c2.us-south.containers.cloud.ibm.com:26165"
@arreusch
arreusch / docker-mac-get-console.sh
Last active March 17, 2021 04:45
Get a serial console to linux host for docker on mac
#!/bin/bash
TTY_TMP=$(mktemp)
$(socat -d -d ~/Library/Containers/com.docker.docker/Data/debug-shell.sock pty,rawer 2>&1 | grep -Eo --line-buffered "/dev/tty\w+" > ${TTY_TMP} ) &
sleep 2
TTY=$(tail -n 1 "${TTY_TMP}")
picocom $TTY 2>/dev/null
@ta264
ta264 / get-docker.sh
Last active December 21, 2024 15:45
Install docker on arm64 synology
#!/bin/bash
set -e
ARCH=aarch64
DOCKER_VERSION=20.10.0
DOCKER_DIR=/volume1/@docker
echo "Downloading docker $DOCKER_VERSION-$ARCH"
curl "https://download.docker.com/linux/static/stable/$ARCH/docker-$DOCKER_VERSION.tgz" | tar -xz -C /usr/local/bin --strip-components=1
@pedrolamas
pedrolamas / docker-iptables-fix.sh
Created August 18, 2020 19:32
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
@jannegpriv
jannegpriv / installation_steps_influxdb_grafana_k3s.md
Last active April 14, 2025 08:07
InfluxDb and Grafana in K3s
@jrussett
jrussett / pan_globalprotect_notes.md
Last active January 31, 2025 23:13
Dealing with PaloAltoNetworks GlobalProtect VPN

Prevent Automatic daemon launching:

Modify the launchd agent for GlobalProtect:

sudo nvim /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist
  • Modify RunAtLoad and KeepAlive to <false/>
sudo nvim /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist
@vzsg
vzsg / 1_JSONTag.swift
Last active November 25, 2020 13:06
Automatically encoding data to JSON with Leaf (for embedding into scripts)
import Leaf
import Foundation
final class JSONTag: TagRenderer {
private let encoder = JSONEncoder()
func render(tag: TagContext) throws -> EventLoopFuture<TemplateData> {
try tag.requireNoBody()
try tag.requireParameterCount(1)
let json = try encoder.encode(tag.parameters[0])