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> | |
<head> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://d3js.org/colorbrewer.v1.min.js"></script> | |
<style> | |
.axis { | |
shape-rendering: crispEdges; | |
stroke-width: 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
require 'benchmark' | |
chars = 'abcdeABCDE!@#$%1234 ' | |
res_str = '' | |
n = 1000 | |
100_000.times do | |
res_str << chars[rand(chars.length)] | |
end | |
Benchmark.bm(15) do |x| |
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
class A; | |
def initialize a | |
@a = a | |
end | |
def to_str | |
@a.dup | |
end | |
def == o |
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
case | |
when utterance.silent? | |
... | |
when utterance.loud? | |
... | |
... | |
else | |
... | |
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
require 'minitest/autorun' | |
require 'uri' | |
class UriValidator | |
ALLOWED_PROTOS = [URI::HTTP, URI::HTTPS, URI::FTP] | |
def initialize uri | |
@uri = uri | |
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
<!doctype html> | |
<html> | |
<body> | |
<script type="text/javascript"> | |
window.location.href = "http://ya.ru" | |
</script> | |
<img src="http://images.sodahead.com/profiles/0/0/1/0/0/4/6/8/3/obama-told-ya-92318595922.jpeg"></img> | |
</body> | |
</html> |
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
.v { | |
height: 500px; | |
background-color: #f8f8f8; | |
background-image: repeating-linear-gradient(45deg, #efefef, #efefef 1px, transparent 1px, transparent 5px), | |
repeating-linear-gradient(135deg, #efefef, #efefef 1px, transparent 1px, transparent 5px); | |
background-size: 7px 7px, 7px 7px; | |
} |
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
$ curl -v ratchet.io -L | |
* About to connect() to ratchet.io port 80 (#0) | |
* Trying 50.97.241.205... | |
* Operation timed out | |
* couldn't connect to host | |
* Closing connection #0 | |
curl: (7) couldn't connect to host |
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
$ curl https://www.getcloak.com/accounts/log-in/ -Lv > /dev/null | |
* About to connect() to www.getcloak.com port 443 (#0) | |
* Trying 50.57.128.105... | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* connected | |
* Connected to www.getcloak.com (50.57.128.105) port 443 (#0) | |
* SSLv3, TLS handshake, Client hello (1): | |
} [data not shown] | |
* SSLv3, TLS handshake, Server hello (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
maxbarnash@pinky:~/work/project@development$ ack 'include Mongoid::Document' app/ -ch | |
33 | |
maxbarnash@pinky:~/work/project@development$ ack '< ActiveRecord::Base' app/ -ch | |
36 |
NewerOlder