Skip to content

Instantly share code, notes, and snippets.

@cawa0505
cawa0505 / gist:5bb7c83a9a69cadc689cb60db5b26dd1
Created May 30, 2024 17:02 — forked from Zeioth/gist:d8c1fd75b5721c2170b4a2a5f19a986e
Sway HiDPI settings (GTK/QT/Sway) - How to
set $cursor_size 54
```
# GTK
# This is the only place where you must set GTK scaling
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Matcha-dark-sea'
gsettings set $gnome-schema icon-theme 'Numix-Square'
gsettings set org.gnome.desktop.interface text-scaling-factor 2.73
@cawa0505
cawa0505 / setup-zsh-in-codespaces.md
Created May 1, 2024 00:10 — forked from ikrishagarwal/setup-zsh-in-codespaces.md
Setup starship, zsh suggestions and syntax highlight for your codespaces.
@cawa0505
cawa0505 / load-balance.sh
Created March 8, 2024 13:26 — forked from girst/load-balance.sh
Simple Linux Load Balancing with `iproute2`
#!/bin/bash
# Load balance multiple internet connections. Requires iproute2, awk and grep.
# (C) 2016 Tobias Girstmair, isticktoit.net, GPLv2
# Also useful: speedometer -l -r eth1 -t eth1 -m $(( 1024 * 1024 * 3 / 2 ))
# Not much user error checking is done - only pass working network connections
# script needs root to work and at least two interfaces to be useful
[ $EUID -eq 0 -a $# -ge 2 ] || {
echo "Usage (as root): $0 iface1[:weight1] iface2[:weight2] ..." >&2
@cawa0505
cawa0505 / Cmd File
Created February 23, 2024 07:53 — forked from PeaJa/Cmd File
Convert VOB to MP4
@echo off
cls
for %%i in (*.vob) do ffmpeg -i %%i -vcodec h264 -s 720x576 -vf yadif -sn -map 0:m:language:rus "%%~ni.mpg"
ffmpeg -i concat:"VTS_01_1.mpg|VTS_01_2.mpg|VTS_01_3.mpg|VTS_01_4.mpg|VTS_01_5.mpg|VTS_01_6.mpg|VTS_01_7.mpg|VTS_01_8.mpg" -c copy output.mpg
ffmpeg -i output.mpg -qscale:v 0 film.mp4
mkdir result_dir
move *.mp4 result_dir
erase *.mpg
@cawa0505
cawa0505 / macbook_pro_ubuntu_install.md
Created February 16, 2024 22:28 — forked from cjonesy/macbook_pro_ubuntu_install.md
Installing Ubuntu on MacBook Pro

Macbook Pro - Ubuntu Install

Requirements

2 USB drives > 2GB

Pre-Install

Create bootable USB drive

  1. Grab the latest Ubuntu Desktop iso image
@cawa0505
cawa0505 / installation_steps_k3s_dashboard.md
Created October 23, 2023 06:33 — forked from jannegpriv/installation_steps_k3s_dashboard.md
Installation steps for K3s dashboard.

Installation steps for K3s dashboard

The steps below requires that you have followed the installation steps for installing K3s on RPIs.

NOTE: The following files can be found in the following repository.

Installation steps for K3s dashboard. On master node, create a folder called dashboard:

@cawa0505
cawa0505 / configuration.nix
Created October 22, 2023 15:59 — forked from nomaster/configuration.nix
NixOS Configuration for experimental K3S cluster node
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@cawa0505
cawa0505 / wayland-blurry-fix.md
Created October 5, 2023 02:04 — forked from pooladkhay/wayland-blurry-fix.md
VSCode blurry text under Wayland

Source: https://wiki.archlinux.org/title/Visual_Studio_Code#Blurry_text_under_Wayland

Due to Electron issues Visual Studio Code defaults to run under XWayland which may cause blurry text if you're using HiDPI screens.

In order to fix this issue you need to force Electron to run under Wayland by adding --enable-features=UseOzonePlatform --ozone-platform=wayland, for example you'll be launching VSCode like

$ code --enable-features=UseOzonePlatform --ozone-platform=wayland

This fix can be made permanent by creating a .desktop file or by directly editing /usr/share/applications/visual-studio-code.desktop

@cawa0505
cawa0505 / Hyprland-Ubuntu.md
Created October 4, 2023 04:08 — forked from Vertecedoc4545/Hyprland-Ubuntu.md
Ubuntu 23.04 Build and Install instructions for Hyprland

Building on Ubuntu 23.04

You have 2 options, use the script descrived bellow or follow the instrutions

script in this gist if you want the source code

wget https://gist.githubusercontent.com/Vertecedoc4545/6e54487f07a1888b656b656c0cdd9764/raw/2c5e8ccb428fc331307e2f653cab88174c051310/build-ubuntu-23.sh
chmod +x build-ubuntu-23.sh
./build-ubuntu-23.sh