SSH into Root
$ ssh root@123.123.123.123
Change Root Password
$ passwd
# Provide desired spotify playlist url you want to save as first argument. | |
# For obtianing links for the tracks you would need vk token. | |
# VK token should have offline and audio permissions. | |
# First argument should be a link to spotify playlist with the open.spotify.com based domen | |
# Second argument is optional for base directory, in which all files would go | |
# For details refer to VK documentation http://vk.com/dev | |
require 'nokogiri' | |
require 'open-uri' | |
require 'vkontakte_api' | |
require 'ruby-progressbar' |
<script type="text/javascript"> | |
function clean(id) { | |
setTimeout('clean2("'+id+'")', 1) | |
} | |
function clean2(id) { | |
el=document.getElementById(id) | |
var savedSel = rangy.saveSelection(); | |
el.innerHTML = el.innerHTML.replace(/(<([^>]+)>)/ig,""); |
def home | |
@map = Cartographer::Gmap.new( 'map_canvas' ) # this is 11 line | |
@map.zoom = :bound | |
@icon = Cartographer::Gicon.new() | |
@map.icons << @icon | |
marker1 = Cartographer::Gmarker.new(:name=> "taj_mahal", :marker_type => "Building", | |
:position => [27.173006,78.042086], | |
:info_window_url => "/url_for_info_content", :icon => @icon) | |
marker2 = Cartographer::Gmarker.new(:name=> "raj_bhawan", :marker_type => "Building", | |
:position => [28.614309,77.201353], |
var center = #{Geocoder.coordinates(request.location.country + ',' + request.location.city)} | |
console.log(center) | |
#production mode on local machine | |
var center = [50.45, 30.5233333] | |
#on heroku | |
var center = 50.4530.5233333 |
Регион Производитель | |
Наименование | |
Крепость Емкость | |
Тип марки Серия | |
Начальный номер Конечный номер | |
------ ---------------------------------------------------------------- | |
----------------------------------------------------------------------- |
[ pid=2094 thr=3065830256 file=ext/nginx/HelperAgent.cpp:584 time=2011-06-23 10:35:04.287 ]: Uncaught exception in PassengerServer client thread: | |
exception: An error occured while sending the request body to the request handler: Connection reset by peer (104) | |
backtrace: | |
in 'virtual void Passenger::Session::sendBodyBlock(const char*, unsigned int)' (Session.h:198) | |
in 'void Client::sendRequestBody(Passenger::SessionPtr&, Passenger::FileDescriptor&, const std::string&, long unsigned int)' (HelperAgent.cpp:295) | |
in 'void Client::handleRequest(Passenger::FileDescriptor&)' (HelperAgent.cpp:510) | |
in 'void Client::threadMain()' (HelperAgent.cpp:603) | |
2011/06/23 10:35:04 [error] 2141#0: *73 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 94.76.87.48, serve$ |
module IntegrationSpecHelper | |
def login_with_oauth(service = :facebook) | |
visit "/auth/#{service}" | |
end | |
end | |
============================================================================ | |
RSpec.configure do |config| | |
config.include IntegrationSpecHelper, :type => :request |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); | |
if (input.val() == '' || input.val() == input.attr('placeholder')) { | |
input.addClass('placeholder'); |
total_peoples = 0 | |
puts "how much groups?" | |
groups = gets.chomp.to_i | |
majority_of_each_group = Array.new | |
groups.times do | |
puts "how much people in group?" | |
peoples = gets.chomp.to_i | |
majority_of_each_group << peoples/2 + 1 | |
end |