Skip to content

Instantly share code, notes, and snippets.

View clarkio's full-sized avatar
🎷
Cool Jazz

Brian Clark clarkio

🎷
Cool Jazz
View GitHub Profile
console.log('setting up the hidden speaker...');
const utt = new SpeechSynthesisUtterance('You can\'t find me! hahahaha');
const speakIt = () => { speechSynthesis.speak(utt); }
const i = setInterval(speakIt, 5000);
console.log('set up complete and speaker will speak soon');
console.log('This was loaded remotely and executed locally');
console.log('HELLO FROM A GIST SCRIPT!!!!');
@clarkio
clarkio / obs-websocket.js
Last active March 6, 2024 22:59
Connecting to OBS Websocket Server with Authentication
const obsConfig = {
address: '127.0.0.1',
port: 4455,
password: 'your-password'
}
const socket = new WebSocket(`ws://${obsConfig.address}:${obsConfig.port}`);
const password = obsConfig.password;
socket.onopen = function(event) {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@clarkio
clarkio / tts.js
Last active June 12, 2020 18:48
web browser text to speech example
var synth = window.speechSynthesis;
// to see how many and which voices you have available
console.log(synth.getVoices());
var utterThis = new SpeechSynthesisUtterance('Get good Brian');
synth.speak(utterThis);
{
"files.exclude": {
".env": false
},
"workbench.colorCustomizations": {
"editorGroup.border": "#102a44",
"sideBar.border": "#102a44",
"tab.activeBorder": "#ff00ff",
"tab.activeModifiedBorder": "#ff00ff",
"activityBar.background": "#b300b3",
@clarkio
clarkio / stream.js
Created June 19, 2019 23:21
@parithon's example of binding this to resolve the issue with our tests for these functions while attempting to wrap in a spy from sinonjs
function startMonitoring(milliseconds) {
return getStatusEvery.bind(this).(milliseconds)
}
function getStatusEvery(milliseconds) {
this.getStreamStatus();
return setInterval(this.getStreamStatus, milliseconds);
}
@clarkio
clarkio / HowTo.txt
Last active September 20, 2018 16:06
A Script to gather instagram account urls from a search query
1. Open the query URL in your browser with the search term you want to use
An example URL searching for dogs: https://www.instagram.com/web/search/topsearch/?context=blended&query=dog&rank_token=0.5831184414520498&include_reel=false
2. Copy the code in the "script.js" file
3. Open up your browser dev tools and go to the console
4. Paste in the code and hit Enter