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
| export const swapObjKeyValue = (json: any) => { | |
| const ret: any = {} | |
| for (const key in json) { | |
| ret[json[key]] = key | |
| } | |
| return ret | |
| } |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
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
| const loadPreference = async defaultPreference => { | |
| let results = await browser.storage.sync.get() | |
| if ((typeof results.length === 'number') && (results.length > 0)) { | |
| results = results[0] | |
| } | |
| if (!results.version) { | |
| await browser.storage.sync.set(defaultPreference) | |
| return defaultPreference |
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://portal.pixelfederation.com/en/profile/friendPlayers/me# | |
| $('a').toArray().filter( a => $(a).text().trim().includes('Confirm') ).forEach(a => a.click()) |
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 map = {} | |
| function fibonacci(n) { | |
| if (n <= 1) return n | |
| map[n-2] = map[n-2] || fibonacci(n-2) | |
| map[n-1] = map[n-1] || fibonacci(n-1) | |
| return map[n-2] + map[n-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
| cloneJson = (a) -> JSON.parse JSON.stringify(a) |
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 isValidIdNumber(str) { | |
| if(!/^[A-Z]\d{9}$/.test(str)) return false; | |
| var multiplier = [1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]; | |
| var map = { | |
| 'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15, 'G': 16, 'H': 17, 'I': 34, | |
| 'J': 18, 'K': 19, 'L': 20, 'M': 21, 'N': 22, 'O': 35, 'P': 23, 'Q': 24, 'R': 25, | |
| 'S': 26, 'T': 27, 'U': 28, 'V': 29, 'W': 32, 'X': 30, 'Y': 31, 'Z': 33 | |
| }; | |
| var decoder = function(id_number){ |
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
| // Kaohsiung 100 - 103 Popularity Parser | |
| // fetch data from http://cabu.kcg.gov.tw/Stat/StatRpts/StatRpt1.aspx?yq=103&mq=1&dq=64000030 | |
| // | |
| // LICENSE: MIT by Geng Zhi Fann | |
| // | |
| var fetch = require('node-fetch') | |
| var cheerio = require('cheerio') | |
| var fs = require('fs') | |
| const iconv = require('iconv-lite'); |
.
├── config.json
├── index.bin
├── output
│ ├── d18955
│ │ ├── d18955.cif
│ │ └── d18955.tex
│ ├── d18955a
│ │ ├── d18955a.cif
NewerOlder