This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## you may need sudo permission to execute some commands or swith to root | |
# if installed old version by yum, remove it first | |
yum -y remove tmux libevent libevent-devel libevent-headers | |
# install deps | |
yum -y install gcc kernel-devel make ncurses-devel wget | |
# create temp dir | |
mkdir /tmp/for-latest-tmux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install VIM with LUA support on centos minimal (tested 2016-01-21 on CentOS 7) | |
# source <(curl -sSL https://gist.githubusercontent.com/sirkkalap/1a9d954122039ab6f78f/raw/vim_centos.sh) | |
# bailout on errors | |
set -e | |
sudo yum -y groupinstall 'Development tools' | |
sudo yum -y install ncurses-devel | |
sudo yum -y install python python-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## from https://gist.github.com/sirkkalap/5b1ac4c3619232533dcc | |
SSHAGENT=/usr/bin/ssh-agent | |
SSHAGENTARGS="-s" | |
eval `$SSHAGENT $SSHAGENTARGS` | |
trap "kill $SSH_AGENT_PID" 0 | |
ids=$(echo $HOME/.ssh/id* | sed -E "s/ ?[^ ]+\.pub//g") | |
for id in $ids; do | |
ssh-add $id | |
done | |
ssh-add -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
chmod 600 "${SSH_ENV}" | |
. "${SSH_ENV}" > /dev/null | |
/usr/bin/ssh-add >/dev/null | |
/usr/bin/ssh-add $HOME/.ssh/id_rsa | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
permitted_file_extensions="mov|mp4|m4v|mpg|mpeg|m2v|mp2|ite|aac|m4a|m4b|m4p|mp3|caf|aiff|aif|aifc|au|sd2|wav|snd|amr|3ga" | |
eval "active_library="$(defaults read com.apple.iApps iTunesRecentDatabases) | |
printf -v active_library '%b' "${active_library[0]//%/\\x}" | |
active_library="${active_library#file://}" | |
if [[ ! -e "$active_library" ]]; then | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RetrierTest { | |
private static int count = 0; | |
@Rule public RetryRule rule = new RetryRule(); | |
@Test | |
@Retry | |
public void failsFirst() throws Exception { | |
count++; | |
assertEquals(2, count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vows = require 'vows' | |
zombie = require 'zombie' | |
assert = require 'assert' | |
events = require 'events' | |
promise = require 'promise' | |
zombie.synchronousChain = (browser, steps)-> | |
promise = new(events.EventEmitter) | |
zombie._linkInTheChain(promise, browser, steps) | |
promise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/a/7819465/720077 | |
takeover() { | |
# create a temporary session that displays the "how to go back" message | |
tmp='takeover temp session' | |
if ! tmux has-session -t "$tmp"; then | |
tmux new-session -d -s "$tmp" | |
tmux set-option -t "$tmp" set-remain-on-exit on | |
tmux new-window -kt "$tmp":0 \ | |
'echo "Use Prefix + L (i.e. ^B L) to return to session."' |
NewerOlder