- Open
gmail.com
- switch to secondary accuont in gmail
- install a Gmail as PWA on desktop as a seperate window
- make sure the PWA has secondaary account opened in PWA window
- Quit the PWA and open it again
- Obeserve that
- the primary account is opened in PWA always no matter how many times you quit and reopen
- also you cant switch the account in PWA to secondary account
- if you try to switch to the secondary account then it is opened in browser and not in PWA
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
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
[ | |
{ | |
"id": 342, | |
"first_name": "Imelda", | |
"last_name": "Seamark", | |
"email": "[email protected]", | |
"gender": "Agender", | |
"ip_address": "239.185.36.189" | |
}, | |
{ |
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
// download some lytrical video from youtube using youtubelink | |
yt-dlp "someYoutubeLink" --extractor-args youtube:player_client=android --throttled-rate 100K -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" | |
// merge downloaded youtube lyrical video with karaoke audio to create karaoke video trakc | |
ffmpeg -i someVideo.mp4 -i someAudio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 "Output Karaoke.mp4" |
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 minimalHeaviestSetA(arr) { | |
let result = []; | |
const sum = (arr) => arr.reduce((acc, curr) => acc + curr, 0); | |
const sortedArr = [...arr].sort((x, y) => x - y > 0 ? -1 : 1); | |
const n = sortedArr.length; | |
const target = sum(arr) / 2 | |
for(let i = 0; i < n; i++) { | |
if(sum(result) > target) { | |
break | |
} |
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 numberOfItems(s, startIndices, endIndices) { | |
// Write your code here | |
let result = []; | |
const countArr = {} | |
let count = 0 | |
for(let i = s.indexOf("|"); i< s.length; i++) { | |
if(s[i] === "|") { | |
countArr[i] = count; | |
} else { | |
count++; |
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 processLogs(logs, threshold) { | |
const n = logs.length; | |
let transactionCountMap = new Map() | |
for(let i=0;i<n;i++) { | |
const log = logs[i]; | |
const [sender, recepient, amount] = log.split(" "); | |
transactionCountMap.set(sender, (transactionCountMap.get(sender) || 0) + 1) | |
if(sender !== recepient) { | |
transactionCountMap.set(recepient, (transactionCountMap.get(recepient) || 0) + 1) | |
} |
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
#! /usr/bin/env node | |
const _ = require('lodash'); | |
const { | |
performance, | |
} = require('perf_hooks'); | |
const isValidInput = process.argv[2] !== "" && !isNaN(Number(process.argv[2])); | |
const size = isValidInput ? Number(process.argv[2]) : 100000; | |
const arr = new Array(size).fill({ | |
key: { | |
nestedKey: { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Debounce and throttle simplified</title> | |
<style> | |
html { |
NewerOlder