Skip to content

Instantly share code, notes, and snippets.

View trapd00r's full-sized avatar
🐫
japh

magnus woldrich trapd00r

🐫
japh
View GitHub Profile

using external displays over usb2displayport while having a nvidia card

pacman -S linux-headers
pamac build evdi displaylink
modprobe evdi
systemctl start displaylink

/etc/xorg.conf.d/20-evdi.conf:

@trapd00r
trapd00r / gist:8ea47d2f57e98ddb37c5ef487d4327dd
Created February 17, 2024 11:05
usb2displayport in linux
# using external displays over usb2displayport while having a nvidia card
```
pacman -S linux-headers
pamac build evdi displaylink
modprobe evdi
systemctl start displaylink
```
**/etc/xorg.conf.d/20-evdi.conf**:
@trapd00r
trapd00r / Dockerfile.php-fpm
Created February 3, 2024 14:41
Dockerfile.php-fpm
FROM php:8-fpm
# Install system dependencies (if any)
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libpq-dev \
&& docker-php-ext-install -j$(nproc) iconv \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
@trapd00r
trapd00r / goup.vim
Created January 28, 2024 12:47
go up
" go up, like in tridactyl
nnoremap gu :call GoUp()<cr>
function! GoUp()
let b:updir = expand('%:h')
execute ':Explore ' . b:updir
endfunction
@trapd00r
trapd00r / aftonbladet.sh
Last active December 20, 2023 15:36
rippa från aftonbladet
wget $(curl 'https://abtvlive-lh.akamaized.net/hls/live/2032323/ab/mjFTw7xx212olIaJ6Wv1A/master7000.m3u8' --compressed -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' -H 'Origin: https://www.aftonbladet.se' -H 'Connection: keep-alive' -H 'Referer: https://www.aftonbladet.se/' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' -H 'DNT: 1' -H 'Sec-GPC: 1' -H 'TE: trailers' \
| perl -pe 's{^master7000/(.+)$}{https://abtvlive-lh.akamaized.net/hls/live/2032323/ab/mjFTw7xx212olIaJ6Wv1A/master7000/$1}' \
| grep '^http') \
&& ls *.ts|perl -pe 's/^/file /' > files.txt \
&& ffmpeg -f concat -i files.txt -c copy "Filip och Fredrik Svarar Sverige.ts" \
&& ffmpeg -i "Filip och Fredrik Svarar Sverige.ts" -acodec copy -vcodec copy "Filip och Fredrik Svarar Sverige".mp4
@trapd00r
trapd00r / mariestad.md
Created November 25, 2023 13:00
spawn mariestad-burk

every day at 16:00, spawn the mariestad ölburk in a new term to signal time to go home

xterm -fn -misc-fixed-medium-r-normal--6-60-75-75-c-40-iso8859-1 \
  -hold \
  -e '$SHELL -c "curl -s https://gist.githubusercontent.com/trapd00r/2a405a890605c49a8e65dbd9604dd59f/raw/43180288f24ac44d058b1309be8eb60adbe1283a/mariestad.txt | cat"'
0 16 * * * spawn_mariestad
@trapd00r
trapd00r / mariestad.txt
Created November 25, 2023 12:32
cat this file
                             
                    [48;5
#navigator-toolbox:not(:hover):not(:focus-within) #toolbar-menubar > * {
background-color: rgb(232, 232, 231);
}
#main-window[sizemode="maximized"] #content-deck {
padding-top: 8px;
}
tabs {
counter-reset: tab-counter;
@trapd00r
trapd00r / batocera-boot.conf
Last active October 30, 2023 15:06
# batocera nas setup
## The device used to store the share data a.k.a. userdata.
## INTERNAL -> Use the same drive Batocera has been flashed to. See https://wiki.batocera.org/add_games_bios on how to add files to the internal storage.
## ANYEXTERNAL -> Use the first external storage detected. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive
## Putting the name here of the drive instead will use that specific external storage. Use the menu in Batocera to see the available options.
## DEVICES -> Use external storage for individual folders. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#manual_configuration_with_batocera-bootconf_advanced
## DEV -> Manually define the GUID of the storage device requested. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#dev_mode
## NETWORK -> Use the network share, requires configuration first. See https://wiki.batocera.org/store_games_on_a_nas
sharedevice=NETWORK
## The device used to store the share data a.k.a. userdata.
## INTERNAL -> Use the same drive Batocera has been flashed to. See https://wiki.batocera.org/add_games_bios on how to add files to the internal storage.
## ANYEXTERNAL -> Use the first external storage detected. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive
## Putting the name here of the drive instead will use that specific external storage. Use the menu in Batocera to see the available options.
## DEVICES -> Use external storage for individual folders. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#manual_configuration_with_batocera-bootconf_advanced
## DEV -> Manually define the GUID of the storage device requested. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#dev_mode
## NETWORK -> Use the network share, requires configuration first. See https://wiki.batocera.org/store_games_on_a_nas
sharedevice=NETWORK