Skip to content

Instantly share code, notes, and snippets.

View marcusianlevine's full-sized avatar

Marcus Levine marcusianlevine

  • OpenSlate
  • New York, NY
View GitHub Profile
@Getty
Getty / haproxy.cfg
Created May 29, 2018 19:58
HAProxy config for splitting between Rancher (raw http/https) and a Traefik container (L4 Proxy before L7 Proxy)
defaults
maxconn 1000
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend https
mode tcp
bind *:443
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@Faheetah
Faheetah / Jenkinsfile.groovy
Last active February 27, 2026 11:52
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active March 16, 2026 18:55
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@jakub-g
jakub-g / git-diff-stat-sort.sh
Last active July 20, 2024 09:17
sort git diff --stat starting from the files that have most lines changed
git show HEAD --stat=200 | tail +7 | awk '{ print $3 " "$4 " " $1}' | sort -n -r | less
@ndarville
ndarville / secret-key-gen.py
Created August 24, 2012 17:01
Generating a properly secure SECRET_KEY in Django
"""
Two things are wrong with Django's default `SECRET_KEY` system:
1. It is not random but pseudo-random
2. It saves and displays the SECRET_KEY in `settings.py`
This snippet
1. uses `SystemRandom()` instead to generate a random key
2. saves a local `secret.txt`