start new:
tmux
start new with session name:
tmux new -s myname
# bash | |
alias b='vi ~/.bash_login' | |
alias u='source ~/.bashrc' | |
#ls | |
alias l='ls -CF' | |
alias ll='ls -alFc' | |
alias la='ls -A' | |
alias lt='ls -lart' |
[user] | |
email = [email protected] | |
name = Adrian Mejia | |
[color] | |
ui = auto | |
interactive = true | |
[alias] | |
ci = commit | |
di = diff --color-words |
# curl -k https://gist.github.com/raw/2976697/a2e9f2ff292a1fe5ceb7ddb05900f73a249abcdb/dotfiles_installer.sh | sudo sh | |
# create directory | |
cd ~/ | |
mkdir gists | |
cd gists | |
# download git stuff | |
git clone git://gist.github.com/2931603.git gitconfig | |
ln -s ~/gists/gitconfig/.gitconfig ~/.gitconfig |
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
shared_examples_for "driver with javascript support" do | |
before { @driver.visit('/with_js') } | |
describe '#find' do | |
it "should find dynamically changed nodes" do | |
@driver.find('//p').first.text.should == 'I changed it' | |
end | |
end | |
describe '#drag_to' do |
Omniauth Facebook Error - Faraday::Error::ConnectionFailed | |
Faraday::Error::ConnectionFailed | |
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :facebook, '<key from fb>', '<another key from fb>' | |
end | |
class SessionsController < ApplicationController | |
def create |
This will be a copy/paste doc for installing redis, elasticsearch and logstash on ubuntu 12.04
apt-get update
apt-get upgrade
apt-get install tcl8.5 tcl8.5-dev build-essential rubygems git \
htop python-dev openjdk-7-jre-headless libcurl4-openssl-dev \
bison ctags flex gperf libevent-dev libpcre3-dev libssl-dev libreadline6-dev \
libtokyocabinet-dev libncursesw5-dev libxml2-dev libxslt1-dev libsqlite3-dev \
# ======================================== | |
# Testing n-gram analysis in ElasticSearch | |
# ======================================== | |
curl -X DELETE localhost:9200/test | |
curl -X PUT localhost:9200/test -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { |
Changes:
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.