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 download(content, fileName, contentType) { | |
| var a = document.createElement("a"); | |
| var file = new Blob([content], {type: contentType}); | |
| a.href = URL.createObjectURL(file); | |
| a.download = fileName; | |
| a.click(); | |
| } | |
| download(JSON.stringify(jsonData), 'json.txt', 'text/plain'); |
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
| var isoCountries = { | |
| 'AF' : 'Afghanistan', | |
| 'AX' : 'Aland Islands', | |
| 'AL' : 'Albania', | |
| 'DZ' : 'Algeria', | |
| 'AS' : 'American Samoa', | |
| 'AD' : 'Andorra', | |
| 'AO' : 'Angola', | |
| 'AI' : 'Anguilla', | |
| 'AQ' : 'Antarctica', |
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
| local lu = require('luaunit') | |
| math.randomseed(os.time()) | |
| local LuaMidi = require('LuaMidi') | |
| local MIN = { | |
| PITCH = 0x00, | |
| VELOCITY = 0, | |
| REPETITION = 1, | |
| CHANNEL = 1, |
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
| local function print_table(t, level) | |
| level = level or 0 | |
| local tab = "" | |
| for i=1, level do | |
| tab = tab.."\t" | |
| end | |
| for k,v in pairs(t) do | |
| if type(v)=="table" then | |
| print(tab..k) | |
| print_table(v, level+1) |
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
| local function contains(t, v) | |
| for index, value in ipairs(t) do | |
| if value == v then | |
| return true | |
| end | |
| end | |
| return false | |
| end | |
| local protected = { |
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
| -- This module contains functions to calculate SHA2 digest. | |
| -- Supported hashes: SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256 | |
| -- This is a pure-Lua module, compatible with Lua 5.1 | |
| -- It works on Lua 5.1/5.2/5.3/5.4/LuaJIT, but it doesn't use benefits of Lua versions 5.2+ | |
| -- Input data may must be provided either as a whole string or as a sequence of substrings (chunk-by-chunk). | |
| -- Result (SHA2 digest) is a string of lowercase hex digits. | |
| -- | |
| -- Simplest usage example: | |
| -- local your_hash = require("sha2for51").sha512("your string") |
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
| -- | |
| -- SHA-1 secure hash computation, and HMAC-SHA1 signature computation, | |
| -- in pure Lua (tested on Lua 5.1) | |
| -- | |
| -- Latest version always at: http://regex.info/blog/lua/sha1 | |
| -- | |
| -- Copyright 2009 Jeffrey Friedl | |
| -- [email protected] | |
| -- http://regex.info/blog/ | |
| -- |
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
| https://github.com/erlang/otp/wiki/Writing-good-commit-messages | |
| http://issuestats.com/ |
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
| unicode implementation | |
| segfault with short selectors (radiolists) |
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
| major: | |
| curses: | |
| textinput scrolling (must track) | |
| minor: | |
| gtk: | |
| radiolists set_value() passing lists with different length than the original (curses is correct) | |