Skip to content

Instantly share code, notes, and snippets.

@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active June 19, 2024 14:10
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@kojiwell
kojiwell / deploy_salt.yml
Last active November 6, 2023 02:08
OpenStack Heat template example: Deploy Salt Cluster with HOT
heat_template_version: 2013-05-23
description: Deploy Salt Cluster
parameters:
keyname:
type: string
description: Key name for loggin in to instances
imagename:
type: string
@nicwolff
nicwolff / back 10 seconds
Created July 24, 2013 00:13
AppleScripts to skip forward 30 seconds or back 10 seconds in either VLC or QuickTime Player
if application "VLC" is running then
tell application "VLC"
step backward
end tell
end if
property step : 10
if application "QuickTime Player" is running then
tell application "QuickTime Player"
set playerPosition to (current time of front document) - step
set movieDuration to duration of front document
@KartikTalwar
KartikTalwar / Documentation.md
Last active June 25, 2024 10:55
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@stackedsax
stackedsax / optimizeFirefoxSqlite.bat
Created January 28, 2012 04:39
Batch file for optimizing the sqlite files in your Firefox profiles
:: This assumes all your various firefox profiles are within your %USERPROFILE% directory
for /f "delims==" %%a in (' dir "%USERPROFILE%\places.sqlite" /s/b ') do echo delete from moz_places where hidden=1 and url like 'http%%';|"sqlite3.exe" "%%a"
for /f "delims==" %%a in (' dir "%USERPROFILE%\*.sqlite" /s/b ') do echo vacuum;|"sqlite3.exe" "%%a"
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git