Skip to content

Instantly share code, notes, and snippets.

@BretFisher
BretFisher / docker-for-mac.md
Last active April 18, 2024 03:45
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@saetia
saetia / gist:1623487
Last active March 19, 2024 15:21
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@sgerin
sgerin / ios_icons
Created August 19, 2013 03:18
Get iOS icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script: http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Gets the 1024px version of an app icon and applies a rounded mask. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# You may find odd result: try searching for both device categories.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
@sgerin
sgerin / gist:6265532
Created August 19, 2013 03:25
Get OS X icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script : http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Fetches the 1024px version of an OS X app icon. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
def find_icon(terms):
@BretFisher
BretFisher / docker-cli-tips-and-tricks.md
Last active December 6, 2023 19:49
Docker CLI Tips and Tricks
@szamuboy
szamuboy / prometheus-operator-helm.yaml
Last active December 28, 2022 19:04
Prometheus-operator HelmChart CRD for k3s
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: prometheus-operator
namespace: kube-system
spec:
chart: stable/prometheus-operator
targetNamespace: prometheus
valuesContent: |-
alertmanager:
@CleanShavenApps
CleanShavenApps / DispatchComposeURLScheme.md
Last active August 27, 2022 20:50
/compose URL scheme for Dispatch mail app (www.dispatchapp.net)

Dispatch registers the x-dispatch:// URL scheme and provides one public action: compose.

/compose overview

Launches Dispatch with the composer screen prefilled using information provided in the parameters below.

from

Optional. Specifies the email address of the account to compose the new mail from. If there are more than one account configured in Dispatch, and no valid from account is provided, Dispatch will default to using the first account configured in Dispatch to compose the mail.

@samisalkosuo
samisalkosuo / Deploy_Oracle.sh
Last active June 17, 2022 09:37
Oracle 12c silent installation files, including response files. Start installation executing Deploy_Oracle.sh. See also here: http://sami.salkosuo.net/silent-service/.
#!/bin/sh
#Set up Linux and oracle
echo "Deploying Oracle..."
if [[ "$1" != "" ]] ; then
DEFAULT_PWD=$1
echo "Using user specified default password"
else
DEFAULT_PWD=passW0RD
@BretFisher
BretFisher / .tmux.conf
Created February 25, 2017 00:40
My ugly tmux config, much copied from others and tweaked
# tmux config for ultimate winning
# make tmux display things in 256 colors
#set -g default-terminal "screen-256color"
# use this if italic enabled in term profile
set -g default-terminal "tmux-256color"
# set just true color without custom term
#set -ga terminal-overrides ",xterm-256color:Tc"
# fixes bug: https://github.com/tmux/tmux/issues/435
#set -ga terminal-overrides ',xterm*:sitm=\E[3m'
@omz
omz / dropboxlogin.py
Created November 7, 2012 21:16
dropboxlogin
# YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW!
# Go to dropbox.com/developers/apps to create an app.
app_key = 'YOUR_APP_KEY'
app_secret = 'YOUR_APP_SECRET'
# access_type can be 'app_folder' or 'dropbox', depending on
# how you registered your app.
access_type = 'app_folder'