~/bin/mysql_table_to_big_query.sh bucket_name schema_name table_name ~/bin/mysql_schema_to_big_query.sh bucket_name [schema_name].
// The issue with sectionHeadersPinToVisibleBounds and sectionFootersPinToVisibleBounds is that they do not pin | |
// first header and last footer when bouncing. This layout subclass fixes that. | |
class StickyLayout: UICollectionViewFlowLayout { | |
override init() { | |
super.init() | |
self.sectionFootersPinToVisibleBounds = true | |
self.sectionHeadersPinToVisibleBounds = true | |
} |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
sysctl -w fs.file-max=12000500 | |
sysctl -w fs.nr_open=20000500 | |
ulimit -n 4000000 | |
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000' | |
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384' | |
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384' | |
sysctl -w net.core.rmem_max=16384 | |
sysctl -w net.core.wmem_max=16384 | |
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {
# ip addresses | |
servers = [ | |
"1.1.1.1" | |
] | |
user = "ubuntu" | |
servers.each do |server| | |
puts server | |
system "scp -q -p test-for-vulnerability #{user}@#{server}:~" |
June 1, 2014 – September 15, 2014
Percentage of total visits for sessions among the top 100 pages on ASCIIwwdc.
- Vast majority of views for 2014 sessions, as might be expected
- Top 6 most-watched session all involve view controllers & Interface Builder (accounting for 1/4 of total traffic)
- "What's New in X" sessions are extremely popular
Original instructions (updates reflected below as of July 2014) at: http://gravitronic.com/compiling-the-nginx-sticky-session-module-in-ubuntu/ | |
sudo su -l | |
aptitude update && aptitude dist-upgrade | |
aptitude install build-essential software-properties-common | |
apt-add-repository ppa:nginx/stable | |
# change precise to different code name if necessary | |
# check contents of source list |
<html> | |
<head> | |
<style type="text/css"> | |
table table { | |
width: 600px !important; | |
} | |
table div + div { /* main content */ | |
width: 65%; | |
float: left; | |
} |