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
window.__testCleanup = () => { | |
const unregisterSW = () => { | |
return navigator.serviceWorker.getRegistrations() | |
.then((registrations) => { | |
const unregisterPromise = registrations.map((registration) => { | |
return registration.unregister(); | |
}); | |
return Promise.all(unregisterPromise); | |
}); | |
}; |
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 | |
################################################################################ | |
# cap - capture your screen | |
# | |
# This script allows you to capture your screen on Linux or macOS systems using | |
# the appropriate tools available on each platform. On Linux, it uses 'slop' | |
# and 'ffmpeg', while on macOS, it utilizes 'screencapture'. The script prompts | |
# you to select a desktop area for recording and saves the recording as an MP4/MOV | |
# file with customizable video quality. |
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 | |
# Video Quality | |
# The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default, | |
# and 51 is worst quality possible. A lower value generally leads to higher | |
# quality, and a subjectively sane range is 17–28 | |
QUALITY=28 | |
# check if slop command exists | |
if ! command -v slop &> /dev/null |
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/sh | |
# parameters: input, output | |
# make a 256-colors palette first | |
palettefull=$( mktemp --suffix=.png ) | |
ffmpeg -i "$1" -vf 'palettegen' -y "$palettefull" | |
# quantize the palette (palettegen's builting limiter | |
# tries to preserve too much similar shades) | |
palettequant=$( mktemp --suffix=.png ) |
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
/* | |
* Copyright (C) 2017 Alberts Muktupāvels | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
<?php | |
/** | |
* PHP XML to dynamic table | |
* | |
* @link http://stackoverflow.com/q/16997835/367456 | |
*/ | |
require('.../Iterator-Garden/src/autoload.php'); // for DecoratingIterator - use development branch | |
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
zypper-download | |
=============== | |
Downloads packages using any amount of available openSUSE mirrors. | |
Installation | |
------------ | |
Copy both files to the following locations: |
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
export default defineConfig({ | |
plugins: [ | |
laravel(['resources/js/app.js']), | |
{ | |
name: 'ziggy', | |
enforce: 'post', | |
handleHotUpdate({ server, file }) { | |
if (file.includes('/routes/') && file.endsWith('.php')) { | |
exec('php artisan ziggy:generate', (error, stdout) => error === null && console.log(` > Ziggy routes generated!`)) | |
} |
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
<?php | |
/************************************************************************* | |
* Get File Information | |
*/ | |
// Assuming these come from some data source in your app | |
$s3FileKey = 's3/key/path/to/file.ext'; | |
$fileName = 'file.ext'; |
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
### Flatpak Repos | |
List packages on a repo : | |
flatpak remote-ls repon-name --user | |
flatpak remote-ls | |
Install packages : | |
flatpak --user install repo-name package-name io.liri.Platform | |
Flathub: |
NewerOlder