"to get the selenium errors locally, you have to use USE_OPTIMIZED_JS=true bundle exec spec spec/selenium/path_to_spec.rb" - stanley
?debug_js=1
bake canvas:compile_assets
"to get the selenium errors locally, you have to use USE_OPTIMIZED_JS=true bundle exec spec spec/selenium/path_to_spec.rb" - stanley
?debug_js=1
bake canvas:compile_assets
[ | |
["The main function of myelin is to", | |
["form a protective coating over nerve axons.", | |
"affect the speed of nerve impulses.", | |
"block the reception of acetylcholine.", | |
"aid a nerve's receptivity to neurotransmitters by increasing the number of receptor sites available."]], | |
["The part of the nerve cell specialized for conducting information is the", | |
["axon.", | |
"cell body.", |
COURSE_ID = 5 # replace this with id of course with many (>=500) students | |
# generating a large course is left as an exercise to the reader | |
course = Course.find(COURSE_ID) | |
# generate quiz | |
q = course.quizzes.create! :title => "Big Quiz" | |
eval(File.read 'quiz_questions.txt').each_with_index do |(question, as), i| | |
answers = as.map.with_index { |a, j| |
(function(){ | |
var | |
rAF = (window.requestAnimationFrame || window.msRequestAnimationFrame || | |
window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || | |
window.oRequestAnimationFrame), | |
cAF = (window.cancelAnimationFrame || | |
window.msCancelAnimationFrame || window.msCancelRequestAnimationFrame || | |
window.mozCancelAnimationFrame || window.mozCancelRequestAnimationFrame || | |
window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || | |
window.oCancelAnimationFrame || window.oCancelRequestAnimationFrame), |
var HomeUI = { | |
imageLoadCounter:1, | |
delayTimer:null, | |
animationTimer:null, | |
timerCounter:0, | |
currentAnimation:null, | |
animating:false, | |
popUpTimer:null, | |
NUM_IMAGES_TO_LOAD:4, | |
POP_UP_DELAY:3000, |
## | |
# replaces :blah: with an image with the appropriate emoji | |
all_emojis = [ | |
'+1', '-1', '100', '1234', '8ball', 'a', 'ab', 'abc', 'abcd', 'accept', | |
'aerial_tramway', 'airplane', 'alarm_clock', 'alien', 'ambulance', 'anchor', | |
'angel', 'anger', 'angry', 'anguished', 'ant', 'apple', 'aquarius', 'aries', | |
'arrow_backward', 'arrow_double_down', 'arrow_double_up', 'arrow_down', | |
'arrow_down_small', 'arrow_forward', 'arrow_heading_down', | |
'arrow_heading_up', 'arrow_left', 'arrow_lower_left', 'arrow_lower_right', |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
## Puts a big annoying arrow in your window when you're not scrolled down, like a dummy | |
# | |
scrollAlert = $("<div id='scrolldown-arrow'>⬇</div>") | |
showing = false | |
body = $ document.body | |
win = $ window | |
doc = $ document |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
Re: On layout & web performance by Kelly Norton
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>#lazyweb Is there any documentation about which jQuery functions/effects trigger layout? re: kellegous.com/j/2013/01/26/l…
— Dave Rupert (@davatron5000) January 28, 2013
getWidthOrHeight()
used in jQuery.fn.width/height
clientLeft