This file contains 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 'http' | |
require 'colored' | |
require 'nokogiri' | |
$url = 'http://playo.ru/goods/241/#.Ur8zaWRdVmg' | |
$run = '/Applications/VLC.app/Contents/MacOS/VLC /Users/bugagazavr/Downloads/1.mp3' | |
$start_price = 695 | |
def get | |
res = HTTP.get($url).response |
This file contains 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
# 2013-09-30 03:21:51:392 [_search] (["seobase-donors"]) | |
# | |
curl -X GET 'http://127.0.0.1:9200/seobase-donors/donor/_search?load=true&size=25&pretty' -d '{"query":{"bool":{"must":[{"query_string":{"query":"*.*","default_operator":"AND"}}]}},"sort":[{"rating":"desc"}],"filter":{"term":{"links.project_id":"12"}},"size":25}' | |
# 2013-09-30 03:21:51:495 [200] (8 msec) | |
# | |
# {"took":8,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":117,"max_score":null,"hits":[{"_index":"seobase-donors","_type":"donor","_id":"2375","_score":null,"_source":{"id":2375,"name":"quote.rbc.ru","rating":20,"comment":"","google_anchor":0,"yandex_anchor":0,"google_index":1,"yandex_index":1,"exclude":null,"donor_type_id":1,"adviser_status":3,"tic":4000,"register_link":null,"broken_old":"","created_at":"2012-05-09T19:55:38.000Z","updated_at":"2013-09-23T22:42:37.544Z","browser_id":1,"broken":false,"pr":7,"last_pr":"2013-09-20T07:03:59.116Z","last_tic":"2013-09-18T03:42:53.657Z","links":[{"project_id":1,"status": |
This file contains 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
doc = Nokogiri::HTML(body) | |
doc.encoding = 'utf-8' | |
tic = 0 | |
pr = 0 | |
doc.search('div.resp-analysis/div#box-basik').each do | yandex | | |
content = yandex | |
if content.to_s.include?('-- тИЦ --') | |
tic = yandex.search('div.row-fluid/div.span4/div.pull-right/a.black.bold.noun')[0].text.to_s.split(' ').join.to_i | |
end | |
end |
This file contains 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
ii libruby1.8 1.8.7.352-2ubuntu1.3 Libraries necessary to run Ruby 1.8 | |
ii libruby1.9.1 1.9.3.0-1ubuntu2.7 Libraries necessary to run Ruby 1.9.1 | |
ii ruby 4.8 Transitional package for ruby1.8 | |
ii ruby-passenger 1:4.0.10-1bbox1~precise1 Rails and Rack support for Apache2 and Nginx | |
ii ruby-passenger-doc 1:4.0.10-1bbox1~precise1 Rails and Rack support for Apache2 - Documentation | |
ii ruby-rack 1.4.1-2~precise1 Modular Ruby webserver interface | |
ii ruby1.8 1.8.7.352-2ubuntu1.3 Interpreter of object-oriented scripting language Ruby 1.8 | |
ii ruby1.8-dev 1.8.7.352-2ubuntu1.3 Header files for compiling extension modules for the Ruby 1.8 | |
rc ruby1.9.1 1.9.3.0-1ubuntu2.7 Interprete |
This file contains 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
{ | |
data: [1] | |
0: { | |
SearchedAlso: [83] | |
0: { | |
Shows: 65790 | |
Phrase: "срубы бань" | |
}- | |
1: { | |
Shows: 65785 |
This file contains 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
sshfs backup_name.your-backup.de: /backups | |
for dir in /home/deploy/apps/* | |
do | |
if [ -d "$dir/current" ]; then | |
if [ ! -d "/backups/$(echo $dir | sed 's#.*/##')" ]; then | |
mkdir "/backups/$(echo $dir | sed 's#.*/##')" | |
fi | |
if [ -f "$dir/shared/config/database.yml" ]; then | |
sudo -u deploy -H bash -c "source /usr/local/rvm/scripts/rvm && cd $dir/current && pwd && bundle exec rake db:dump RAILS_ENV=production" | |
if [ -f "$dir/current/db/data.yml" ]; then |
This file contains 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
NewerOlder