Skip to content

Instantly share code, notes, and snippets.

@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:
@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'
@BretFisher
BretFisher / docker-for-mac.md
Last active March 29, 2024 06:08
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


@BretFisher
BretFisher / docker-cli-tips-and-tricks.md
Last active December 6, 2023 19:49
Docker CLI Tips and Tricks
docker-machine create -d virtualbox swarm-keystore
eval "$(docker-machine env swarm-keystore)"
docker run -d \
-p "8500:8500" \
-h "consul" \
progrium/consul -server -bootstrap
docker-machine create \
-d virtualbox \
from BeautifulSoup import BeautifulSoup as Soup
import urllib
raw_page = urllib.urlopen('http://www.sfrandonneurs.org/home.htm')
soup = Soup(raw_page)
class MarkdownTable:
@staticmethod
@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
@waltonjones
waltonjones / ST_QuickCursor
Created December 3, 2014 05:21
Shell script for use in Keyboard Maestro macro to mimic "QuickCursor" with Sublime Text
export __CF_USER_TEXT_ENCODING=0x1F5:0x8000100:0x8000100
TMPFILE=`mktemp /tmp/XXXXXX`
/usr/bin/pbpaste > $TMPFILE
echo $TMPFILE
~/bin/subl -w $TMPFILE:10000000:10000000
@jsbain
jsbain / ZoomView.py
Created November 25, 2014 10:25
ZoomView.py
import ui
class Touch(object):
''' writable version of ui.Touch'''
def __init__(self,touch):
self.location=touch.location
self.touch_id=touch.touch_id
self.phase=touch.phase
self.prev_location=touch.prev_location
self.timestamp=touch.timestamp
// Drafts 4 script step to create custom tags
// using the a line or a default value if that line is empty or missing
// split draft into an array of lines
var lines = draft.content.split('\n');
// reusable function to define tag based on line or default string
function createLineTag(lineNumber,default) {
var tagName = "line"+(lineNumber+1).toString();
if(lines[lineNumber] && lines[lineNumber].length > 0) {