Skip to content

Instantly share code, notes, and snippets.

@justinleveck
justinleveck / .tmux.conf
Last active August 26, 2020 21:02
tmux conf for remote shell
## Use reattach-to-user-namespace as the wrapper script to handle Mac OS X
## support for pbcopy and pbpaste.
#set -g default-shell /usr/bin/zsh
set -g default-command "${SHELL}"
## Tell tmux to copy these environment variables over from the original shell
## that tmux was launched in. These are important for ssh-agent on mac os x to
## work properly when inside your tmux sessions. Otherwise, it will make you
## type in your key password when trying to ssh to different machines.
set-option -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
.center {
position: absolute;
width: 50px;
height: 25px;
top: calc(50% - 25px); /* 50% - height */
left: calc(50% - 50px); /* 50% - width */
}

Twitter API

GET

Show Tweet

# Capybara Screenshots - Full Page
options = {}
# options[:width] = current_window.size[0]
# options[:height] = current_window.size[1]
path = "tmp/screenshot.png"
page.driver.resize_window(2548, 1238)
options[:width] = 2548
options[:height] = 1238
Tabbed by: Jason Watson
Date: 4/24/2009
Updated: 7/29/2010
Bridge added. Check out the tutorial video:
http://il.youtube.com/watch?v=b73onkQt9ds&feature=related
Performance video:
http://www.youtube.com/watch?v=UJDguHJ34SE
@justinleveck
justinleveck / .gitconfig
Last active January 21, 2016 23:51
git checkout alias (with fuzzy match)
[alias]
co = "!f() { \
git checkout $(git branch | grep $1 | sed -e 's/^* //'); \
}; f"
@justinleveck
justinleveck / gist:8549103
Last active January 4, 2016 01:29
Stash - Branch Input

Stash - Branch input box

This will hide the branch span tag and insert an input box with the git checkout branch command to allow for easy cutting & pasting

Usage

Tripple click input to copy git co branch command Double click over branch name to copy only branch name

  1. Install Chrome extension
@justinleveck
justinleveck / install.sh
Last active December 21, 2015 10:19
Install PhantomJS 1.9 on Ubuntu VM run: bash -c "$(curl -fsSL https://raw.github.com/gist/6291000)"
cd ~/
wget http://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2
mv ~/phantomjs-1.9.0-linux-x86_64.tar.bz2 /usr/local/share
cd /usr/local/share
sudo tar xvf phantomjs-1.9.0-linux-x86_64.tar.bz2
#!/bin/bash
#
# This script needs "fpm". If you dont have it,
# run "gem install fpm"
#
# You also need to "apt-get install python-setuptools" (otherwise fpm fails)
echo "[ build and install vim from source ]"
#!/bin/bash
#
# Install Postgres 9.2 on a clean Ubuntu 12.04
"""
LC_ALL issue
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file.