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 'open-uri' | |
begin | |
req = open("http://ya.ru") | |
if req.base_uri.to_s.include? "yota" | |
puts "Enabling freebies" | |
#req2 = open("http://hello.yota.ru/wa/v1/service/temp/sa") | |
`curl 'http://hello.yota.ru/wa/v1/service/temp/sa' -H 'Accept: application/json, text/plain, */*' -H 'Referer: http://hello.yota.ru/sa/?redirurl=http:%2F%2Fya.ru%2F' -H 'Origin: http://hello.yota.ru' -H 'X-Requested-With: XMLHttpRequest' -H 'User-Agent: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.89 Safari/537.36' -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{}' --compressed` | |
#puts req2.read |
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
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
var items = document.getElementsByTagName("*"); | |
var ebashilovo = false; | |
setInterval(function() { | |
if (ebashilovo == true) { | |
for (i of items) { |
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
it = []; $(".featured-list-item").each(function() { it.push([$(this).find("h2").find("a").html(), parseFloat($(this).find("p").find("strong").html().replace("as low as $", ""))]); }); it = it.sort(function(a, b){ var x=a[1]; var y=b[1]; return y-x; }); $.each(it, function() { console.log(this); }) |
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
$(document).keydown(function(e) { if(e.which == 40) { $("article").each(function() { if ($(this).offset().top > $(document).scrollTop()) { $(document).scrollTop($(this).offset().top+5); return false; } }); } e.preventDefault(); }); |
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
while read line; do sudo -u postgres /usr/bin/pg_dump $line > /media/storage00/pgdump/$line-$(date +%d-%m-%Y).sql; done < /var/lib/postgresql/backup-list.txt |
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
// tanuki 2019 | |
havka = []; | |
s = __NEXT_DATA__.props.initialState.products.data | |
for (key of Object.keys(s)) { | |
p = s[key]; | |
havka.push([p.title, p.weight/p.price, p.price, p.weight, p.calories]) | |
} | |
havka = havka.sort(function(a, b){ var x=a[1]; var y=b[1]; return y-x; }); | |
eblo = ""; |