Skip to content

Instantly share code, notes, and snippets.

@kiryasolod
kiryasolod / DiscordWaylandFullScreenStreaming.md
Last active August 24, 2024 01:40
Discord Wayland full-screen streaming in ArchLinux (tested on Hyprland)

1. Add yourself to video group

sudo usermod -aG video <username>

2. Add some variables (I'm not sure it's necessary)

export XDG_RUNTIME_DIR="/run/user/$(id -u)"

3. Install packages

sudo pacman -S wf-recorder v4l2loopback-dkms v4l2loopback-utils

4. Execute the following commands. They will create config files for modprobe service

@baatochan
baatochan / README.md
Last active August 8, 2024 17:33
Linux (Manjaro [Arch]) on an HP Elite x2 1012 G2 with Intel i5

Linux (Manjaro [Arch]) on an HP Elite x2 1012 G2 with Intel i5

This are my notes from the installation of Manjaro Linux on an HP Elite x2 1012 G2 with Intel Core i5-7200U. This was meant to be a fast installation for basic internet things so more advanced stuff like docking station or virtualization are not covered. However this installation differs a little from my other ones as I installed Windows on this device as well and this is convertible Tablet PC so I was playing around with touch a little.

Detailed specs

  • Host: HP Elite x2 1012 G2
  • Resolution: 2736x1824 (best used with 150% scaling as this is only 12" screen)
  • CPU: 7th gen Intel Core i5-7200U
  • GPU: Intel HD Graphics 620
@smarek
smarek / 70-huawei-e3.conf
Last active February 26, 2022 17:00
Raspberry / Banana Huawei E3372 network interface name
# /etc/udev/rules.d/70-huawei-e3.conf
# Necessary for network interface name
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14dc", NAME="usb0"
# Might be duplicate to usb_modeswitch config, however it's good to have it there
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/huawei_e3.conf"
@csullivan
csullivan / cereal_polymorphic_serialization.cc
Last active April 9, 2023 23:27
polymorphic data serialization example with cereal
#include <iostream>
#include <vector>
#include <memory>
#include <cereal/archives/binary.hpp>
#include <cereal/types/vector.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/base_class.hpp>
#include <cereal/types/memory.hpp>
#include <cereal/access.hpp>
@ShapeShifter499
ShapeShifter499 / vpn-hotspot.sh
Created September 3, 2016 18:36
vpn hotspot script
#!/storage/xbin/bash
# This script should help forward VPN over any tethered connection on a Android device. Turn on tethering, then enable VPN, then run this script.
# Inital variable setup
tethering=0
# Setup iptables before forwarding VPN
iptables -A POSTROUTING -o tun0 -j MASQUERADE -t nat
@wllmtrng
wllmtrng / MainActivity.java
Created December 29, 2014 16:27
OpenCV Camera Android Java Example
package com.example.helloopencvcamera;
import org.opencv.android.BaseLoaderCallback;
import org.opencv.android.CameraBridgeViewBase;
import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2;
import org.opencv.android.LoaderCallbackInterface;
import org.opencv.android.OpenCVLoader;
import org.opencv.core.Mat;