Skip to content

Instantly share code, notes, and snippets.

View sigma's full-sized avatar
🏠
Working from Home

Yann Hodique sigma

🏠
Working from Home
View GitHub Profile
@dghubble
dghubble / kubeception.md
Last active July 13, 2024 07:01
Running QEMU/KVM and Nested Kubernetes on Bare-Metal Kubernetes
@adambom
adambom / README.md
Last active May 27, 2024 07:51
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
@sigma
sigma / ipy_profile_gae.py
Created August 29, 2010 09:39
#published GAE #ipython configuration
import IPython.ipapi
from getpass import getpass
from netrc import netrc
from optparse import OptionParser
from google.appengine.ext.remote_api import remote_api_stub
from google.appengine.tools.appcfg import AppCfgApp, StatusUpdate
from google.appengine.tools.bulkloader import RequestManager
@sigma
sigma / gitproxy
Created August 23, 2010 11:18
flexible proxy traversal
#!/bin/bash
target_ip=`gethostip -d $1`
function is_local() {
echo $1 | grep '\(10\.\|127\.\|172\.\)'
}
flag=`is_local "$target_ip"`
if [ -n "$flag" ]; then
@sigma
sigma / postactivate
Created July 28, 2010 16:47
virtualenv global postactivate: don't change PS1 in my back
PS1="$_OLD_VIRTUAL_PS1"
export PS1
unset _OLD_VIRTUAL_PS1
rehash
@sigma
sigma / get_scratch.sh
Created July 25, 2010 09:04
get_scratch.sh
#!/bin/zsh
scratchpad="scratch$1"
if tmux has -t $scratchpad; then
tmux attach -t $scratchpad
else
tmux new -s $scratchpad
fi
@sigma
sigma / nfs_force_umount
Created November 9, 2009 14:06
force umount NFS
ifconfig eth0:fakenfs <dead nfs server> netmask 255.255.255.255
umount -f /nfs/...
ifconfig eth0:fakenfs down
@sigma
sigma / ssl_tee.sh
Created November 2, 2009 13:57
#published ssl_tee.sh
#!/bin/bash
# this allows to dump clear-text form of the exchanges between SSL client and SSL server
# client-side verification has to be disabled of course
# anyway, useful for debugging
# to run this you'll need
# - a unix system
# - socat
# - ncat (part of nmap 5.0 suite)
@sigma
sigma / .xmodmap
Created August 20, 2009 12:07
.xmodmap
keycode 0x12 = 9 bracketleft
keycode 0x13 = 0 bracketright
keycode 0x22 = parenleft braceleft
keycode 0x23 = parenright braceright
remove Lock = Caps_Lock
remove Control = Control_L
remove Control = Control_R
remove Mod2 = Num_Lock