This file contains hidden or 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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains hidden or 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
<% if @price_total_monthly > 100 %> | |
<%= number_to_currency(@price_total_monthly.to_f/100, :precision => 2, :separator => ",") %> | |
<% else %> | |
<%= number_to_currency(@price_total_monthly.to_f/100, :precision => 1, :separator => ",") %> | |
<% end %> | |
# покороче | |
<%= number_to_currency(@price_total_monthly.to_f/100, :precision => (@price_total_monthly > 0 ? 2 : 1), :separator => ",") %> |
This file contains hidden or 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
require 'spec_helper' | |
describe "HistoryItems" do | |
before(:each) {login_as :user} | |
describe "GET /history_items" do | |
it "works!" do | |
visit history_items_path | |
response.should be_success | |
end | |
end |
This file contains hidden or 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
{ | |
"auto_complete_commit_on_tab": true, | |
"color_scheme": "Packages/Solarized Color Scheme (TextMate)/Solarized (light).tmTheme", | |
"create_window_at_startup": false, | |
"draw_white_space": "all", | |
"folder_exclude_patterns": | |
[ | |
".bundle", | |
"tmp", | |
".git", |
This file contains hidden or 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
- (void)webView:(WebView *)sender didReceiveServerRedirectForProvisionalLoadForFrame:(WebFrame *)frame { | |
NSURL *currentUrl = [[[frame dataSource] request] URL]; | |
NSString *currentRequest = [authDialog mainFrameURL]; | |
NSLog(@"URL:"); | |
NSLog(currentRequest); | |
NSLog([currentUrl absoluteString]); | |
} |
This file contains hidden or 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
# Capistrano configuration | |
# | |
# require 'new_relic/recipes' - Newrelic notification about deployment | |
# require 'capistrano/ext/multistage' - We use 2 deployment environment: staging and production. | |
# set :deploy_via, :remote_cache - fetch only latest changes during deployment | |
# set :normalize_asset_timestamps - no need to touch (date modification) every assets | |
# "deploy:web:disable" - traditional maintenance page (during DB migrations deployment) | |
# task :restart - Unicorn with preload_app should be reloaded by USR2+QUIT signals, not HUP | |
This file contains hidden or 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
sqlite3 ~/Library/Application\ Support/Skype/your_userbane/main.db "SELECT author,timestamp, body_xml FROM messages WHERE dialog_partner = 'friend_username'" > ~/Desktop/skype_chat_history.txt |
This file contains hidden or 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
require "bundler/capistrano" | |
set :default_environment, { | |
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
} | |
set :application, "lxc-frontend" | |
set :repository, "path to repo" | |
set :scm, :git |
This file contains hidden or 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
# Description: | |
# Displays a leaderboard.pro company leader | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# HUBOT_LEADERBOARD_AUTH_TOKEN | |
# HUBOT_LEADERBOARD_COMPANY | |
# |
This file contains hidden or 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/sh | |
exec 2>&1 | |
export RAILS_ENV=production | |
APP_ROOT=/home/deploy/project_name | |
UNICORN="/usr/local/rvm/bin/rvm 1.9.2@project_name exec bundle exec unicorn_rails -c $APP_ROOT/current/config/unicorn.rb -E $RAILS_ENV" | |
cd $APP_ROOT/current | |
exec $UNICORN |