Skip to content

Instantly share code, notes, and snippets.

View brayn003's full-sized avatar
💡
ideating...

Rudraprasad Das brayn003

💡
ideating...
View GitHub Profile
@brayn003
brayn003 / ping.js
Created November 10, 2020 12:40
One liner code to ping a URL every 3 secs
const URL = 'https://google.com';
const main = () => fetch(URL).then(r => r.status === 200 ? console.log('IS UP', r) : console.log('down', setTimeout(main, 3000)) ).catch(() => setTimeout(main, 3000));
@brayn003
brayn003 / main.py
Last active January 28, 2024 11:42
Jarvis voice assistant
import pyttsx3
import datetime
import speech_recogncition as sr
import wikipedia
import webbrowser
engine = pyttsx3.init()
# voices = engine.getProperty('voices')
# engine.setProperty('voice', voices[13].id)
@brayn003
brayn003 / script.js
Created May 8, 2020 16:04
Wheeling code
window.addEventListener("wheel", event => {
const delta = Math.sign(event.deltaY);
//console.info(delta);
if (delta > 0) {
nextSection();
}
else if (delta < 0) {
previousSection();
}
});