This file contains hidden or 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 ruby | |
require 'fileutils' | |
TARGET = 'pdfs/' | |
LOG_FILE = TARGET + 'pandoc.log' | |
# set to number of cpu cores/threads | |
THREADS = 6 * 2 |
This file contains hidden or 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
(function () { | |
window._storage = {}; | |
window._storage2 = {}; | |
window.lastQ = null; | |
window.tick = function (i) { | |
var $exercise = $('#exercise'); | |
var q = $('#pronoun-input, #verb-input').text().trim(); | |
var v = $('#verb-input').text().trim(); | |
if (q) { | |
if (_storage[q]&&_storage[q].trim().length) { |
This file contains hidden or 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
function triggerKeyboardEvent(el, keyCode, type) | |
{ | |
var eventObj = document.createEventObject ? | |
document.createEventObject() : document.createEvent("Events"); | |
if(eventObj.initEvent){ | |
eventObj.initEvent(type, true, true); | |
} | |
eventObj.keyCode = keyCode; |
This file contains hidden or 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
module PaginationHelper | |
def paginate(current, max, template, delta: 2) | |
left = current - delta | |
right = current + delta + 1 | |
range = [] | |
range_with_dots = [] | |
l = nil | |
max.times do |_i| | |
i = _i + 1 | |
if i == 1 || i == max || i >= left && i < right |
This file contains hidden or 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
# =================================================== | |
# EXAMPLE IS ON BOTTOM | |
# EXAMPLE IS ON BOTTOM | |
# EXAMPLE IS ON BOTTOM | |
# EXAMPLE IS ON BOTTOM | |
# EXAMPLE IS ON BOTTOM | |
# =================================================== | |
require 'base64' |