Just add a "scrollable" class name to your background element, then it will scroll from left to right, according to your scroll event.
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> | |
<head> | |
<title>D3 over Polymap example</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="map.css" /> | |
</head> | |
<body onload="init();"> | |
<div id="map_container"></div> |
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> | |
<head> | |
<title>CSS3 Sign</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> | |
<div class="container"> |
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 bash | |
for i in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23; do echo $( echo -e "$i\t"; git shortlog -n --format='%ad %s' | grep " $i:" | wc -l); done |
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
import sys | |
import codecs | |
import pystache | |
import os | |
import fnmatch | |
import string | |
import datetime | |
webroot = 'http://www.example.com/ | |
path = '/var/www/' |
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
SRC=src | |
$(JSHINT): | |
npm install jshint | |
JS_FILES=$(shell find $(SRC) -type f -name '*.js') | |
jslint: $(JSHINT) | |
-$(JSHINT) --jslint-reporter --config config/jshint.json > jshint.xml $(JS_FILES) || : | |
sed -E 's?<file name="(.*)\?">?<file name="'`pwd`'/\1">?' jshint.xml > jshint-proper.xml |
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
env |
(from http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1)
Save yourself some time and tune the kernel tcp settings before testing with lots of connections, or your test will fail and you’ll see lots of Out of socket memory messages (and if you are masquerading, nf_conntrack: table full, dropping packet.)
Here are the sysctl settings I ended up with - YMMV, but these will probably do:
$ cat /etc/sysctl.conf
# General gigabit tuning:
net.core.rmem_max = 16777216
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
- L1 cache reference 0.5 ns | |
- Branch mispredict 5 ns | |
- L2 cache reference 7 ns | |
- Mutex lock/unlock 25 ns | |
- Main memory reference 100 ns | |
- Compress 1K bytes with Zippy 3,000 ns | |
- Send 2K bytes over 1 Gbps network 20,000 ns | |
- Read 1 MB sequentially from memory 250,000 ns | |
- Round trip within same datacenter 500,000 ns | |
- Disk seek 10,000,000 ns |
Object Calisthenics outlines 9 basic rules to apply when performing the exercise:
- One level of indentation per method.
- Don't use the ELSE keyword.
- Wrap all primitives and Strings in classes.
- First class collections.
- One dot per line.
- Don't abbreviate.
- Keep all classes less than 50 lines.
- No classes with more than two instance variables.
OlderNewer