Skip to content

Instantly share code, notes, and snippets.

@dkorduban
dkorduban / bindings.json
Created March 20, 2020 02:23
Reviewable key binding with showHideAllComments
[
["f", "Show next/latest diffs", "setProposedDiffBounds()"],
["n", "Next unreviewed file", "nextUnreviewedFile()"],
["p", "Previous unreviewed file", "prevUnreviewedFile()"],
[null, "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"],
[null, "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"],
["shift+n", "Next changed file", "nextChangedFile()"],
["shift+p", "Previous changed file", "prevChangedFile()"],
[null, "Next visible file", "nextVisibleFile()"],
mode \ n_max 30000 100000 300000 1000000
LuaJIT interpreted 98 567 2900 17600
LuaJIT JIT-compiled 21 96 462 2609
relative speedup 4.72 5.88 6.27 6.75
-- BYTECODE -- euler021.lua:1-17 ; divisors_sum(r0)
0001 KSHORT 1 0 ; r1 = 0
0002 KSHORT 2 1 ; r2 = 1
0003 ISGE 2 0 ; if r2 >= r0
0004 JMP 2 => 0006 ; goto 0006
0005 KSHORT 1 1 ; r1 = 1
0006 => KSHORT 2 2 ; r2 = 2
0007 => MULVV 3 2 2 ; r3 = r2 * r2
0008 ISGT 3 0 ; if r3 > r0
0009 JMP 3 => 0023 ; goto 0023
local function divisors_sum(n)
local sum = 0
if n > 1 then
sum = 1
end
local k = 2
while k*k <= n do
if n % k == 0 then
sum = sum + k + n/k
if k*k == n then
@dkorduban
dkorduban / gist:2115948
Created March 19, 2012 15:18
LaTeX related stuff
== SLIDES ==
1. Beamer
http://www.stattler.com/article/ready-made-beamer-presentation-template
http://carlesm.com/2007/04/latex-beamer-templates-2/
http://nicku.org/teaching-template-system-source/index.shtml
http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
== GRAPHICS ==