Skip to content

Instantly share code, notes, and snippets.

View FlamingArch's full-sized avatar
Caffeinating

Harsh Chaturvedi FlamingArch

Caffeinating
View GitHub Profile
@FlamingArch
FlamingArch / nodeStdinInput.js
Created February 20, 2022 06:25
Read Stdin in Node.js
const input = (ques, callback) => {
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
rl.question(ques, (input) => {
callback(input);
});
@FlamingArch
FlamingArch / openWebsite.applescript
Created April 9, 2021 10:58
AppleScript to open website in new Safari Window
tell application "Safari"
make new document
tell window 1
tell current tab
set URL to "https://www.example.com"
end tell
end tell
end tell