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(){ | |
var hosts = [ | |
'vk.com', | |
'last.fm', | |
'lastfm.ru', | |
'wikipedia.org', | |
'lurkmore.to', | |
'habrahabr.ru', | |
'lenta.ru', |
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
#!/usr/bin/env python | |
import SimpleHTTPServer | |
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_my_headers() | |
SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self) | |
def send_my_headers(self): |
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
javascript:window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&labels='+encodeURIComponent(prompt('Labels')||''), '', 'width=800,height=500,resizable=yes,scrollbars=yes,status=yes,location=yes,top='+(screen.availHeight-500)/2+',left='+(screen.availWidth-800)/2) |
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
// http://instagram.com/<username>/media | |
function handleInstagramJSON(json){ | |
var html = []; | |
if ( json.items && json.items.length ) { | |
json.items.forEach(function(item){ | |
var img = '<img width="300" src="' + item.images.standard_resolution.url + '">'; | |
var imgLink = '<a href="' + item.link + '" target="_blank">' + img + '</a>'; | |
var date; |
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
html, body { | |
padding: 0; | |
margin: 0; | |
height: 100%; | |
} | |
body { | |
font-family: Verdana, sans-serif; | |
} |
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
var AMOUNT_TO_ADD = 3000; | |
function formatNumber(number, separator){ | |
var str = number.toString(); | |
var a = str.split('.')[0]; | |
var b = str.split('.')[1]; | |
var formatted = a.replace(/\d(?=(\d{3})+$)/g, "$&" + separator); | |
if ( b ) { | |
if ( b.length < 2 ) { | |
b+= '0'; |
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() { | |
var send = function(url, content, type) { | |
if (type == null) | |
type = 'text/html;charset=utf-8'; | |
else | |
type = type.match(/^[^;]+/)+';charset=utf-8'; | |
var form = document.createElement('form'); | |
form.setAttribute('method', 'post'); | |
form.setAttribute('action', 'http://www.peeep.us/upload.php'); |
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
$('body').on('click', function(e){ | |
var target = $(e.target); | |
if ( !target.parents().is('.dropdown') ) { | |
$('.dropdown-list').addClass('m-hidden'); | |
} | |
}); | |
$('.dropdown-button').on('click', function(e){ | |
$(e.currentTarget) | |
.next('.dropdown-list') | |
.removeClass('m-hidden') |
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
<a class="create-test__task-evaluate button button-yellow" href="#" data-url="<%= evaluate_template_test_tasks_path(task.test.id, code: task.type_to_code) %>" data-trigger="task-evaluation" data-target="#task_initial_words_raw" data-container="#eval-container">Evaluate</a> | |
<span class="create-test__task-generate dropdown"> | |
<span class="create-test__task-generate-button dropdown-button button"> | |
Generate words | |
<i class="dropdown-button-arrow pe-7s-angle-down"></i> | |
</span> | |
<ul class="dropdown-list m-hidden"> | |
<li class="dropdown-item"> | |
<span class="dropdown-item-inner" data-value="easy">Easy</span> |
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
[ | |
{ | |
"k": 9093999, | |
"v": "vk.com" | |
}, | |
{ | |
"k": 3773207, | |
"v": "linkedin.com" | |
}, | |
{ |