This file contains 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
// example in the body | |
// paste it in the chrome console | |
let raw = ` | |
APP_NAME=Laravel | |
APP_ENV=local | |
`; | |
raw = raw.split('\n').filter(str => str.length > 0 && str[0] != '#') |
This file contains 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 _pgcd(a, b) { | |
if (b) { | |
return _pgcd(b, a % b); | |
} else { | |
return Math.abs(a); | |
} | |
} | |
const createRatio = (width, height, color) => { | |
return { ratio: width / height, width, height, color }; |
This file contains 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
#!/bin/bash | |
osascript << EOF | |
set windowFounded to 0 | |
set tabFounded to 0 | |
tell application "$1" | |
set window_list to every window | |
set counter_window to 0 |
This file contains 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
#!/bin/bash | |
twitchVideoId=$(basename $1) | |
curl -ss --location --request GET "https://api.twitch.tv/kraken/videos/$twitchVideoId" \ | |
--header 'Client-Id: kimne78kx3ncx6brgo4mv6wki5h1ko' \ | |
--header 'Accept: application/vnd.twitchtv.v5+json' \ | |
| jq -r '.animated_preview_url' \ | |
| sed 's/\/storyboards.*/\/chunked\/index-dvr.m3u8/' |