Skip to content

Instantly share code, notes, and snippets.

@justintv
justintv / .bashrc
Created August 17, 2009 00:53
Display git branch in bash prompt
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
@gertrudster
gertrudster / .zshrc
Created November 9, 2011 15:38
.zshrc
# users generic .zshrc file for zsh(1)
autoload colors
colors
autoload -U compinit
compinit
export LSCOLORS=ExFxCxdxBxxxxxBxBxExEx
export LS_COLORS='di=01;34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
zstyle ':completion:*' list-colors 'di=01;34' 'ln=35' 'so=32' 'ex=31' 'bd=46;34' 'cd=43;34' 'su=41;30' 'sg=46;30' 'tw=42;30' 'ow=43;30' menu select=1
@flixr
flixr / .zshrc
Created December 12, 2011 16:50
zsh config file
# .zshrc
# (copyleft) 2012 by Felix Ruess
#
# ---[ System settings ]------------------------------------------------
limit -s coredumpsize 0
umask 0027
@neocsr
neocsr / .ackrc
Created February 10, 2012 06:46
oh-my-zsh-custom
--sort-files
--color
--context=1
--follow
--group
--ignore-dir=vendor
--ignore-dir=db/server
--ignore-dir=log
--ignore-dir=tmp
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 31, 2024 22:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jayjanssen
jayjanssen / gist:5697813
Created June 3, 2013 12:33
Testing multicast with iperf
this is a sample of output:
root@percona-db-2:~# iperf -s -u -B 226.94.1.1 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 226.94.1.1
Joining multicast group 226.94.1.1
Receiving 1470 byte datagrams
UDP buffer size: 122 KByte (default)
------------------------------------------------------------
@X4
X4 / autocomplete.zsh
Last active March 17, 2023 17:21
some zsh modules
#
# Sets completion options.
#
# Load and initialize the completion system ignoring insecure directories.
zmodload zsh/complist
autoload -Uz compinit && compinit -i
autoload -U colors ; colors
zle -C complete-menu menu-select _generic
@pbanaszkiewicz
pbanaszkiewicz / Preferences.sublime-settings
Last active December 27, 2021 16:53
Sublime Text 3 configuration
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "solid",
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
"draw_minimap_border": true,
"enable_telemetry": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@itsmattsoria
itsmattsoria / gistfil1.textile
Last active May 27, 2024 12:09
Mac Terminal Cheat Sheet

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor