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
@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) {
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
@clarkio
clarkio / settings.json
Created February 9, 2018 00:50
Archive VS Code Settings 08022018
{
"workbench.editor.tabSizing": "shrink",
"explorer.openEditors.visible": 0,
"window.zoomLevel": 1,
"git.confirmSync": false,
"prettier.singleQuote": true,
"prettier.printWidth": 120,
"editor.lineNumbers": "on",
"editor.lineHeight": 0,
@clarkio
clarkio / vs-code-can-do-that-settings.json
Last active May 19, 2018 19:39
VS Code settings to use for recording VS Code Can Do That content
{
"window.zoomLevel": 4,
"editor.formatOnSave": true,
"workbench.iconTheme": "vs-seti",
"workbench.colorTheme": "Monokai Dimmed",
"prettier.singleQuote": true
}