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
| import { ChatGPTAPIBrowser } from 'chatgpt' | |
| import fs from 'fs' | |
| import { readdir } from 'node:fs/promises'; | |
| const directoryPath = "./text"; | |
| async function example() { | |
| // use puppeteer to bypass cloudflare (headful because of captchas) |
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
| 192.168.1.102 gitlab.synology.com | |
| 192.168.1.8 nuc.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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
| <meta http-equiv="Content-Security-Policy" | |
| content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"> | |
| <link href="./styles.css" rel="stylesheet"> | |
| <title>Hello World!</title> |
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 i = getPageNumWords(); | |
| for (var p = 0; p < i; p++) { | |
| var word = getPageNthWord(0, p, false); | |
| console.println(word); | |
| if (word == "通" && getPageNthWord(0, p - 1, false) == "沟") { | |
| var annot = this.addAnnot({ | |
| page: 0, | |
| type: "Highlight", | |
| author: "A. C. Robat", | |
| point: [300, 400], |
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
| import { PDFDocument, StandardFonts, rgb } from "pdf-lib"; | |
| import fs from "fs"; | |
| import fontkit from "@pdf-lib/fontkit"; | |
| // Create a new PDFDocument | |
| const pdfDoc = await PDFDocument.create(); | |
| // var font = fontkit.openSync('fonts/msyh.ttf'); | |
| const fontData = fs.readFileSync("fonts/msyh.ttf"); | |
| pdfDoc.registerFontkit(fontkit); |
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 () { | |
| const ea = window.ExcalidrawAutomate; | |
| ea.onDropHook = async function (data) { | |
| console.log(data); | |
| if ( | |
| data.payload.text && | |
| data.payload.text.substring(0, 11) == "obsidian://" | |
| ) { | |
| ea.reset(); |
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
| import jieba | |
| import jieba.analyse | |
| from optparse import OptionParser | |
| import win32clipboard | |
| import re | |
| import glob | |
| import os | |
| def content2links(content): | |
| tags = jieba.analyse.textrank(content, 5) |
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 bash | |
| ## This is the target path, the directory | |
| ## you want to copy to. | |
| target=$2; | |
| ## Find all files and folders in the current directory, sort | |
| ## them reverse alphabetically and iterate through them | |
| find $1 -maxdepth 1 -type f | sort -r | while IFS= read -r file; do | |
| ## Set the counter back to 0 for each file | |
| counter=0; |
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
| version: "2.1" | |
| networks: | |
| internal_network: | |
| services: | |
| db: | |
| restart: always | |
| networks: | |
| - internal_network | |
| build: ./MongoDB/ | |
| environment: |
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
| import System; | |
| import System.Windows.Forms; | |
| import Fiddler; | |
| // INTRODUCTION | |
| // | |
| // Well, hello there! | |
| // | |
| // Don't be scared! :-) | |
| // |
NewerOlder