Skip to content

Instantly share code, notes, and snippets.

View dsseng's full-sized avatar

Dmitry Sharshakov dsseng

View GitHub Profile
@davidedmundson
davidedmundson / PlasmaNested.sh
Last active July 15, 2024 02:34
Run plasma from within gamescope
#!/bin/sh
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
## whilst being launched by plasma-session
mkdir $XDG_RUNTIME_DIR/nested_plasma -p
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
#!/bin/sh
@eoli3n
eoli3n / root-podman-wayland.sh
Last active June 5, 2024 13:32
Run an application with dbus and wayland sockets in a rootless podman container
# Install docker or podman package on your distro (podman doesn't need a daemon like dockerd to work). All args are exactly same, just replace ``podman`` with ``docker`` in command if you want to.
sudo pacman -S podman
# Run an archlinux container with dbus and wayland sockets.
sudo podman run \
--volume "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY":/tmp/wayland-0 \
--device /dev/dri \
--volume /run/user/1000/bus:/tmp/bus \
--rm -it archlinux /bin/bash
@progandy
progandy / README.md
Last active September 26, 2023 08:27
Sway output mirror and screencast

Sway output mirror and screencast

Mirror

wf-recorder

With wf-recorder it is possible to record one output. When ffmpeg is compiled with sdl support, then it is possible to use "sdl" as the muxer and replay the recorded video instead of writing it to a file.

@ikester
ikester / uvc-gadget-configfs.sh
Last active June 12, 2023 18:30
Linux USB UVC gadget driver setup script.
#!/bin/bash
# set -e
cd /sys/kernel/config/usb_gadget/
mkdir -p g1
cd g1
echo 0x1d6b > idVendor # Linux Foundation
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@sebastianrothbucher
sebastianrothbucher / README.md
Created March 16, 2019 16:27
Vuejs guide as ebook (epub / Kindle)

This is how you can conver the vuejs guide to a .ePub / Kindle (.mobi) file to read in an eReader (or eReader app):

  • Make sure you have Pandoc available (on a Mac, it can be installed by brew install pandoc via Homebrew)
  • Checkout or download master from the Vue docs repo [https://github.com/vuejs/vuejs.org]
  • go to src/v2/guide
  • run the following commands in a shell (builds one markdown in order of order attr in each file):
echo '' > toc
for i in *.md
do 
@edrex
edrex / README.md
Last active April 23, 2024 18:23
Streaming screen capture under Wayland

Recipes

kmsgrab capture with ffmpeg

sudo LIBVA_DRIVER_NAME=iHD ffmpeg -crtc_id 69  -framerate 60 -f kmsgrab -i - -vaapi_device /dev/dri/renderD128 -filter:v hwmap,scale_vaapi=w=1920:h=1200:format=nv12 -c:v h264_vaapi -profile:v constrained_baseline -level:v 3.1 -b:v 20000k test.mp4

LIBVA_DRIVER_NAME=iHD ffmpeg -device /dev/dri/card0 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi -vstats output.mp4

@MajesticPotatoe
MajesticPotatoe / SCSS_Structuring
Last active January 3, 2019 05:37
SCSS_Structuring
Legend
> Folder
- file
* note
Folder Structures
> scss
> base
* resets, global defaults
> components
@johnleider
johnleider / bash
Last active November 19, 2018 18:52
Docs next
# Fork vuetify https://github.com/vuetifyjs/vuetify
git clone your-fork
cd vuetify
git checkout feat/docs-next
yarn
yarn build
lerna run dev --scope vuetifyjs.com --stream