Stash current changes
- git > Stash > Stash (Include Untracked)
Create stash as patch
git stash show "stash@{0}" -p > changes.patchApply patch
| #!/bin/bash | |
| ################################# | |
| # Instructions | |
| # | |
| # First, install ffmpeg and youtube-dl | |
| # | |
| # https://ffmpeg.org/download.html | |
| # https://ytdl-org.github.io/youtube-dl/download.html | |
| # |
| <?php | |
| LazyCollection::macro("fromCsv", function (string $path, int $chunk = 0, string $separator = ";"): LazyCollection { | |
| /** @var LazyCollection $collection */ | |
| $collection = static::make(function () use (&$separator, &$path, &$chunk) { | |
| $handle = fopen($path, 'r'); | |
| while ($line = fgetcsv(stream: $handle, separator: $separator)) { | |
| yield array_map(fn ($item) => trim($item), $line); | |
| } | |
| }); |
| <?php | |
| namespace App\Filament\PageTemplates; | |
| use Filament\Forms\Components\Repeater; | |
| use Filament\Forms\Components\RichEditor; | |
| use Filament\Forms\Components\TextInput; | |
| final class Faq | |
| { |
| { | |
| "preset": "per", | |
| "rules": { | |
| "align_multiline_comment": true, | |
| "array_indentation": true, | |
| "array_syntax": true, | |
| "blank_line_after_namespace": true, | |
| "blank_line_after_opening_tag": true, | |
| "combine_consecutive_issets": true, | |
| "combine_consecutive_unsets": true, |
| <?php | |
| namespace Tests; | |
| use InvalidArgumentException; | |
| use Illuminate\Support\Collection; | |
| use Laravel\Dusk\TestCase as BaseTestCase; | |
| use Facebook\WebDriver\Chrome\ChromeOptions; | |
| use Facebook\WebDriver\Firefox\FirefoxOptions; | |
| use Facebook\WebDriver\Remote\RemoteWebDriver; |
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.
Set up the encoders as shown:
| <?php | |
| namespace App; | |
| use Illuminate\Support\Str; | |
| use Symfony\Component\DomCrawler\Crawler; | |
| class HtmlCompressor | |
| { | |
| protected bool $removeComments = true; |