Skip to content

Instantly share code, notes, and snippets.

View peter-avila's full-sized avatar

Peter Avila peter-avila

View GitHub Profile
@chris-gillatt
chris-gillatt / setup_fedora_kde_xrdp.sh
Last active February 23, 2025 17:42
Set up Fedora 41, complete with a desktop environment to RDP to.
#!/bin/bash -e
# Define variables
USER_NAME="user"
RDP_PORT=3389
# Create a new password for the RDP user
USER_PASSWORD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-12})
# Check for root privileges
if [[ $EUID -ne 0 ]]; then
@itsfolf
itsfolf / vnc.md
Last active April 7, 2025 17:24
How to setup VNC on Wayland (Sway) + SDDM for unattended access

How to setup VNC on Wayland (Sway) + SDDM for unattended access

1. Install both x11vnc and wayvnc

Since SDDM runs under X11 we will be running two separate vnc services, each on it's own port. x11vnc will take care of SDDM, while wayvnc will handle our desktop session. Both services are set up with SSL encryption.

While it's technically possible to run a single service with some scripting magic to switch between the two, this was by far the easiest and most reliable way.

2. Set up x11vnc

Set a password

@codeSTACKr
codeSTACKr / mongodb_cheat_sheet_2022.md
Created January 10, 2022 22:54
MongoDB Cheat Sheet 2022
@the-spyke
the-spyke / pipewire.md
Last active July 10, 2025 10:25
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@artizirk
artizirk / gnupg_scdaemon.md
Last active June 22, 2025 17:26
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO

@legowerewolf
legowerewolf / hyperstart.bat
Last active December 31, 2024 09:17
Selecting a shell on startup in the Hyper terminal emulator
@ECHO off
:top
CLS
ECHO Choose a shell:
ECHO [1] cmd
ECHO [2] bash
ECHO [3] PowerShell
ECHO [4] Python
ECHO.
ECHO [5] restart elevated
@michaeltreat
michaeltreat / mongodb_shell_commands.md
Last active May 20, 2025 19:11
Quick Cheat Sheet for Mongo DB Shell commands.

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@zloeber
zloeber / bootstrapwindows10.ps1
Last active June 19, 2024 21:51
Boxstarter Windows 10 Configuration
<#
The command to run, built from the raw link of this gist
Win+R
iexplore http://boxstarter.org/package/url?<RAW GIST LINK>
OR (if you don't like the way the web launcher force re-installs everything)
@eduncan911
eduncan911 / Revert-Gist.md
Last active June 20, 2025 23:11
Revert Gist Commits

Revert / Undo a Gist Commit

It was not exactly obvious. Here's how to revert a Gist commit!

Checkout the gist like a normal git repo:

# replace the Gist ID with your own
git clone [email protected]:cc13e0fcf2c348cc126f918e4a3917eb.git

Treat it like a normal repo. Edit, force push, etc.