echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
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
# How to consume Github Package private registry with yarn? | |
Create an .npmrc file in the same location as the package.json with this content. | |
``` | |
registry=https://registry.yarnpkg.com/ | |
@<username>:registry=https://npm.pkg.github.com | |
//npm.pkg.github.com/:_authToken=<your auth token> | |
always-auth=true |
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 calculateContainsWindow(image) { | |
var imageComputedStyle = window.getComputedStyle(image); | |
var imageObjectFit = imageComputedStyle.getPropertyValue("object-fit"); | |
var coordinates = {}; | |
var imagePositions = imageComputedStyle.getPropertyValue("object-position").split(" "); | |
var naturalWidth = image.naturalWidth; | |
var naturalHeight= image.naturalHeight; | |
if( image.tagName === "VIDEO" ) { | |
naturalWidth= image.videoWidth; |
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
const puppeteer = require('puppeteer'); | |
// Streams the first webcam in the system to the specified Jitsi Meet room. Audio is currently | |
// not sent, but it can be easily enabled by disabling the corresponding setting in `meetArgs`. | |
// | |
// TODO | |
// - Detect if we are kicked from the room | |
// - Support authenticated deployments | |
// |
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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
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
var YourViewModel = function () { | |
var self = this; | |
self.thing = ko.observable(''); | |
$.get('api/call', function (data) { | |
self.thing(data); | |
// thing is loaded, | |
self.loaded.thing(true); |
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
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM | |
# AND install the CloudInit.NET service, 7-zip, curl and .NET 4 if its missing. | |
# Then use the EC2 tools to create a new AMI from the result, and you have a system | |
# that will execute user-data as a PowerShell script after the instance fires up! | |
# This has been tested on Windows 2008 R2 Core x64 and Windows 2008 SP2 x86 AMIs provided | |
# by Amazon | |
# | |
# To run the script, open up a PowerShell prompt as admin | |
# PS> Set-ExecutionPolicy Unrestricted | |
# PS> icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://raw.github.com/gist/1672426/Bootstrap-EC2-Windows-CloudInit.ps1')) |