Skip to content

Instantly share code, notes, and snippets.

View liorrozen's full-sized avatar

Lior Rozen liorrozen

View GitHub Profile
@liorrozen
liorrozen / .tmux.conf
Last active June 27, 2016 22:51
My tmux.conf
# Reset Prefix
set -g prefix C-a
# Escape time
set -s escape-time 0
# large history
set-option -g history-limit 10000
# don't rename window
@liorrozen
liorrozen / tmux-ssh-sesstion
Last active February 26, 2017 11:23
Tmux scripting
#!/bin/bash
SESSION=sess_name
PROJ_FOLDER=proj_name
cd $PROJ_FOLDER
# if the session is already running, attach to it.
tmux has-session -t $SESSION
if [ $? -eq 0 ]; then
<script>
var user_already_annoyed = false;
window.onbeforeunload = function() {
if ( !user_already_annoyed ){
lpTag.vars.push([{ scope:"page", name:"tryclose", value:"true" }]);
lpTag.vars.send();
user_already_annoyed = true;
return "Please don't leave just yet. Click 'stay on this page' for a nice discount!";
}
}
@liorrozen
liorrozen / code-spice.md
Last active August 29, 2015 13:58
Look at your code.

Hello coders,

Look at your code.
Now look at mine.
Now back to your code
Now back to MINE!

Sadly, your code does not render correctly.
But if you stopped using IE and switched to Chrome;
Your code would render correctly.

@liorrozen
liorrozen / can-haz
Last active May 3, 2017 08:14
Alias "can-haz" to "sudo apt-get" allowing you to run commands like "can-haz apache2".
alias can-haz="sudo apt-get install"
# Autocomplete function
_can-haz() {
cur=`_get_cword`
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
return 0
}
complete -F _can-haz can-haz