- Make sure
PulseAudio
is installed - Search for "Startup applications" in applications (click on windows menu and search)
- click Add item
- In Command input -
pactl set-default-source 'alsa_input.usb-0c76_USB_PnP_Audio_Device-00.mono-fallback'
[refer below for how to get the name of the mic] - Click save
- It should run automatically from next startup
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
/** | |
* Ask: Update the App component so the <h2> element gets a color | |
* from the COLORS array. Clicking on the Next button should cycle through the colors. | |
* | |
* Example: It should be initially blue, then red, ..., cyan, and then blue again. | |
*/ | |
import ReactDOM from "react-dom"; | |
// import { useState } from "react"; | |
const COLORS = ["blue", "red", "green", "yellow", "black", "cyan"]; |
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
// Interview question by Fluxon (round 2) | |
//iterator interface | |
// next(): number; | |
// hasNext(): boolean; | |
class ArrayIterator<T> { | |
nextIdx = 0; | |
arr: T[] = []; | |
constructor(arr: T[]) { | |
this.arr = arr; |
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
# https://www.atpeaz.com/disable-zscaler-temporarily-on-your-mac/ | |
# disable | |
sudo launchctl unload /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl unload /Library/LaunchDaemons/com.zscaler.tunnel.plist | |
# Reenable | |
sudo launchctl load /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl load /Library/LaunchDaemons/com.zscaler.tunnel.plist |
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
//log | |
const log4js = require("log4js"); | |
const path = require("path"); | |
log4js.configure({ | |
appenders: { | |
info: { | |
type: "dateFile", | |
filename: path.join(__dirname, "../logs", "info.log") | |
}, | |
errors: { |
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 removal(cA,bA) { | |
var count = 0; | |
for (var i = 0; i < cA.length; i++) { | |
if (i < 0) continue; | |
for (var j = 0; j < bA.length; j++) { | |
if (i < 0 || j < 0) continue; | |
count++; | |
console.log('comparing', i, j, cA[i], bA[j]); | |
if (cA[i] == bA[j]) { | |
console.log('removed', i, j, cA[i], bA[j]); |
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
/* | |
- https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/read | |
- https://stackoverflow.com/a/23024504/7314900 | |
- https://stackoverflow.com/a/54132144/7314900 | |
*/ | |
function getTextFromBlob(blob){ | |
var reader = new FileReader(); | |
reader.onload = function() { | |
console.log(reader.result); | |
} |
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
/** | |
const myInput = document.getElementById("myInput"); | |
function helloInput() { | |
console.log( "You typed:", myInput.value ); | |
} | |
myInput.addEventListener( | |
"keyup", | |
debounce( helloInput, 1000 ) |
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
//log | |
const log4js = require("log4js"); | |
const path = require("path"); | |
log4js.configure({ | |
appenders: { | |
errors: { | |
type: "dateFile", | |
filename: path.join(__dirname, "../../logs", "errors.log") | |
} | |
}, |
NewerOlder