Skip to content

Instantly share code, notes, and snippets.

@lalyos
lalyos / 00-k8s-prompt.md
Last active March 31, 2025 15:03
simple shell based prompt generated with promptline.vim

Sometimes a very simple prompt is useful - like creating documentation, or github issues. In those cases its still important to be able to tell the k8s context/ns

white [ctx/ns]

PS1='[$(kubectl config view --minify -o jsonpath="{.contexts[0].name}:{.contexts[0].context.namespace}")]$ '

orange [ns]

@oubiwann
oubiwann / appify.sh
Last active April 19, 2025 14:45 — forked from advorak/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {
@lizrice
lizrice / main.go
Created August 25, 2016 10:02
Container from scratch
package main
// @lizrice, mostly copied from @doctor_julz: https://gist.github.com/julz/c0017fa7a40de0543001
import (
"fmt"
"os"
"os/exec"
"syscall"
)
@lalyos
lalyos / README.md
Last active August 29, 2015 14:07
boot2docker OSX installer, selecting pacakages

The OSX installer of boot2docker is one single pkg file over 100MB. It containes the follwoing 7 subpackages:

  • DockerCLI : Installs the Docker for Mac OS X client into /usr/local/bin/
  • Boot2DockerCLI : Installs the Boot2Docker management tool into /usr/local/bin/
  • Boot2DockerISO : Installs the boot2docker.iso into /usr/local/share/
  • Boot2DockerAPP : Installs the boot2docker Quick-start applet into /Applications/
  • VBoxKEXTs : Installs the Oracle VM VirtualBox Kernel Extensions into /Library/Application Support/VirtualBox.
  • VBox : Installs the Oracle VM VirtualBox application into /Applications.
  • VBoxCLI : Installs the Oracle VM VirtualBox command line utilities into /usr/bin.
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@cdown
cdown / gist:1163649
Last active April 14, 2025 22:42
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in