sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
require 'spec_helper' | |
describe Users::OauthCallbacksController, "handle facebook authentication callback" do | |
describe "#annonymous user" do | |
context "when facebook email doesn't exist in the system" do | |
before(:each) do | |
stub_env_for_omniauth | |
get :facebook |
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |
# NAME: authinabox | |
# VERSION: 1.01 (Dec 27, 2008) | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: An "all in one" Sinatra library containing a User model and authentication | |
# system for both session-based logins OR HTTP Basic auth (for APIs, etc). | |
# This is an "all in one" system so you will probably need to heavily tailor | |
# it to your own ideas, but it will work "out of the box" as-is. | |
# COMPATIBILITY: - Tested on 0.3.2 AND the latest rtomayko Hoboken build! (recommended for the latter though) | |
# - NEEDS DataMapper! | |
# - Less work needed if you use initializer library -- http://gist.github.com/40238 |
#!/bin/bash | |
sudo apt-get install -y git-core ruby-rvm libcairo2-dev libpixman-1-dev libpango1.0-dev libgif-dev libjpeg-dev libgtk2.0-dev vlc libvlc-dev portaudio19-dev libsqlite3-dev libcurl4-openssl-dev libxslt1-dev makeself curl libxslt-dev libxml2-dev | |
\# Load RVM into a shell session *as a function* | |
if [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then | |
\# Then try to load from a root install | |
source "/usr/local/rvm/scripts/rvm" | |
else |
准备: | |
libxml2 2.6.18 or above from http://www.xmlsoft.org/ | |
libxslt 1.1.x or above from http://www.xmlsoft.org/ | |
先查看当前系统中是否有安装libxml2,libxslt这两个库,如果没有请到下面的网站中去下载安装 | |
# sudo apt-get install libxml2-dev | |
# sudo apt-get install libxslt1-dev | |
由于安装pgAdmin3需要wxGTK,所以也要下载wxGTK | |
wxGTK 2.8.x from http://www.wxwidgets.org/ |
def fizzbuzz(fizz,buzz,fizzbuzz,counter) | |
if fizzbuzz == 15 | |
print("fizzbuzz ") | |
fizzbuzz = 0 | |
fizz = 0 | |
buzz = 0 | |
elsif fizz == 3 | |
print("fizz ") | |
fizz = 0 | |
elsif buzz == 5 |
int equilibrium (int A[], int n){ | |
int sum = 0; | |
int solution = -1; | |
int leftSum = 0; | |
int rightSum = 0; | |
// Calculate the sum of all P in A | |
for (int i = 0; i < n; i++) | |
sum += A[i]; | |
// Try to find an equilibrium -> if yes return the first one | |
for (int i = 0; i < n; i++){ |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
accessKeyId: '{AWS_KEY}', | |
secretAccessKey: '{AWS_SECRET}', | |
region: '{SNS_REGION}' | |
}); | |
var sns = new AWS.SNS(); |