Skip to content

Instantly share code, notes, and snippets.

View MrOrz's full-sized avatar
💤
Sleepy everyday

Johnson Liang MrOrz

💤
Sleepy everyday
View GitHub Profile
{
"type": "bubble",
"header": {
"type": "box",
"layout": "horizontal",
"contents": [
{
"type": "text",
"text": "送出訊息到公開資料庫?",
"weight": "bold",
@MrOrz
MrOrz / .babelrc
Created March 15, 2019 08:15
Reproduce the "SyntaxError: First argument must be tagged template expression. You should use 'msgid' tag" issue
{
"presets": [
"env",
"react"
]
}
@MrOrz
MrOrz / main.gs
Created May 7, 2021 16:07
165 news crawler
/**
* @OnlyCurrentDoc
*/
const DATA_SHEET = '165 民眾通報假投資/博弈詐騙網站';
function getLastDate() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(DATA_SHEET);
const lastRow = sheet.getLastRow();
@MrOrz
MrOrz / hash.js
Last active September 3, 2022 16:02
Cofacts collected image scripts
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(),
@MrOrz
MrOrz / appsscript.json
Last active March 16, 2023 09:31
Cofacts prompt engineering (see https://g0v.hackmd.io/@cofacts/rd/%2F%40cofacts%2FrknFrmdk3 for the project)
{
"timeZone": "Asia/Taipei",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8",
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets.currentonly",
"https://www.googleapis.com/auth/script.external_request"
]
{
"fullTextAnnotation": {
"pages": [
{
"blocks": [
{
"blockType": "TEXT",
"boundingBox": {
"vertices": [
{