- level-1
- level-3
- level-2
- level-2
- level-3
* level-3
- level-2
* level-3
def a | |
doc = <<-EOS | |
def hello | |
puts "Hello World!" | |
end | |
EOS | |
end |
require 'benchmark/ips' | |
Benchmark.ips do |x| | |
ary = [] | |
x.report(:a) { | |
10_000.times do |num| | |
ary << "#{num} #{num * 2} #{num * 3}" | |
end | |
} |
Try rails/webpacker
gem 'webpacker', github: "rails/webpacker"
resource "digitalocean_droplet" "web" { | |
image = "ubuntu-16-04-x64" | |
name = "web-1" | |
region = "sgp1" | |
size = "512mb" | |
ssh_keys = [12345] | |
connection { | |
type = "ssh" | |
user = "root" |
#!/bin/bash | |
set -x | |
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
curl -LO https://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb | |
echo mysql-apt-config mysql-apt-config/select-product select Apply | sudo debconf-set-selections | |
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections | |
echo mysql-apt-config mysql-apt-config/select-connector-python select none | sudo debconf-set-selections |
<html> | |
<head> | |
<title>data-attribute test</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="tgt" data-msg='my message is here!'> | |
<p>Foo</p> | |
<p>Bar</p> | |
</div> |
$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
$('.info').on('click', function(){ | |
$('html, body').animate({ | |
scrollTop: $(this).offset().top | |
}, 500); | |
}); |