This file contains 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
{ | |
"fullTextAnnotation": { | |
"pages": [ | |
{ | |
"blocks": [ | |
{ | |
"blockType": "TEXT", | |
"boundingBox": { | |
"vertices": [ | |
{ |
This file contains 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
{ | |
"timeZone": "Asia/Taipei", | |
"dependencies": { | |
}, | |
"exceptionLogging": "STACKDRIVER", | |
"runtimeVersion": "V8", | |
"oauthScopes": [ | |
"https://www.googleapis.com/auth/spreadsheets.currentonly", | |
"https://www.googleapis.com/auth/script.external_request" | |
] |
This file contains 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 fs = require('fs/promises'); | |
const { hashes } = require('@cofacts/media-manager'); | |
const sharp = require('sharp'); | |
async function main() { | |
const path = process.argv[2]; | |
const fd = await fs.open(path); | |
const [{ size }, { format }] = await Promise.all([ | |
fd.stat(), |
This file contains 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
/** | |
* @OnlyCurrentDoc | |
*/ | |
const DATA_SHEET = '165 民眾通報假投資/博弈詐騙網站'; | |
function getLastDate() { | |
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(DATA_SHEET); | |
const lastRow = sheet.getLastRow(); |
This file contains 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
Show hidden characters
{ | |
"presets": [ | |
"env", | |
"react" | |
] | |
} |
This file contains 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
{ | |
"type": "bubble", | |
"header": { | |
"type": "box", | |
"layout": "horizontal", | |
"contents": [ | |
{ | |
"type": "text", | |
"text": "送出訊息到公開資料庫?", | |
"weight": "bold", |
This file contains 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
{ | |
"type": "bubble", | |
"styles": { | |
"footer": { | |
"separator": true | |
} | |
}, | |
"body": { | |
"type": "box", | |
"layout": "vertical", |
This file contains 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 DOC_URL = process.argv[2]; | |
const puppeteer = require('puppeteer'); | |
const fs = require('fs'); | |
const readabilityJsStr = fs.readFileSync('node_modules/readability/Readability.js', {encoding: 'utf-8'}) | |
function executor() { | |
return new Readability({}, document).parse(); | |
} |
This file contains 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
[ | |
{ | |
"key_as_string": "2016-12-05", | |
"key": 1480896000000, | |
"doc_count": 4, | |
"user_counts": { | |
"value": 1 | |
} | |
}, | |
{ |
This file contains 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
/* Converts | |
export default class extends React.PureComponent { | |
static displayName = 'Calendar'; | |
... | |
} | |
to this: | |
export default class Calendar extends React.PureComponent { |
NewerOlder