Skip to content

Instantly share code, notes, and snippets.

View dr3mro's full-sized avatar

Dr Amr Osman dr3mro

View GitHub Profile
@bademux
bademux / enable_hardware_acceleration.sh
Last active October 20, 2022 14:05
Enable hardware acceleration and dark mode for UngoogledChromium
~/.var/app/com.github.Eloston.UngoogledChromium/config/chromium-flags.conf << EOF
--enable-gpu-rasterization
--enable-oop-rasterization
--enable-gpu-compositing
--enable-accelerated-2d-canvas
--enable-zero-copy
--canvas-oop-rasterization
--enable-accelerated-video-decode
--enable-accelerated-video-encode
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiIgnoreDriverChecks
@raspberrypisig
raspberrypisig / CMakeLists.txt
Last active November 5, 2024 02:49
msys2 vscode integration c++ vcpkg cmake
cmake_minimum_required(VERSION 3.10)
project (roguelike-firststab)
set(SDL2_DIR "C:/msys64/mingw64/bin/vcpkg/installed/x64-mingw-static/share/sdl2")
set(glad_DIR "C:/msys64/mingw64/bin/vcpkg/installed/x64-mingw-static/share/glad")
set(lodepng-c_DIR "C:/msys64/mingw64/bin/vcpkg/installed/x64-mingw-static/share/lodepng-c")
set(libtcod_DIR "C:/msys64/mingw64/bin/vcpkg/installed/x64-mingw-static/share/libtcod")
find_package(libtcod CONFIG REQUIRED)
add_executable(roguelike-firststab main.cpp)
target_link_libraries(roguelike-firststab PRIVATE libtcod::libtcod)
add_definitions(-DSDL_MAIN_HANDLED)
@indgy
indgy / quiet_boot.sh
Last active April 12, 2022 01:39
FreeBSD Quiet Boot
#!/bin/sh
# Speed up boot slightly
sysrc background_dhclient=YES
sysrc -f /boot/loader.conf autoboot_delay=3
# Quieten boot messages
sysrc rc_startmsgs=NO
sysrc -f /boot/loader.conf boot_mute=YES
sysrc -f /boot/loader.conf beastie_disable=YES
@colematt
colematt / Backup-and-Restore-GPG-and-SSH-keys.md
Created November 16, 2020 03:24
[Backup and Restore GPG and SSH keys] #git #gpg #ssh

Backup

  1. Copy both id_rsa and id_rsa.pub from ~/.ssh/ to a USB drive. Identify the private key by executing the following command.
    gpg --list-secret-keys --keyid-format LONG
    
  2. It will show something similar to this.
    sec   4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
    
@jansc
jansc / loader.conf
Created October 25, 2020 09:54
ThinkPad X250 loader.conf
kern.vty=vt
# https://unrelenting.technology/articles/freebsd-on-the-thinkpad-x240
# Place devices in low-power mode when no driver found
# See also https://www.davidschlachter.com/misc/t480-freebsd
hw.pci.do_power_nodriver=3
#drm.i915.enable_rc6=7
hw.snd.latency=7
hint.pcm.0.buffersize=65536
@p7cq
p7cq / Arch_Linux_Root_On_ZFS.md
Last active November 5, 2024 10:14
Install Arch Linux with Root on ZFS

Arch Linux Root on ZFS

Installation steps for running Arch Linux with root on ZFS using UEFI and systemd-boot. All steps are run as root.

Requires an Arch Linux image with ZFS built-in (see References).

In live environment

If using KVM, add a Serial number for each virtual disk and reboot the VM. The disks should now be available in /dev/disk/by-id as virtio-<Serial>.

@diffficult
diffficult / bluetoothdoubledipping.md
Last active November 11, 2024 19:31
Bluetooth Pairing one device on Dual Boot of Windows & Linux - Stop having to Pair Devices

Bluetooth Pairing one device on Dual Boot of Windows & Linux - Stop having to Pair Devices

You may have experienced when dual booting that you need to re-pair your bluetooth devices (ie., Headphones, mouse, keyboard, etc) this usually happens because you have already paired the device with another operating system using the same bluetooth adapter when dual booting (either Linux or Windows).

Some devices cannot handle multiple pairings associated with the same MAC address (ie., bluetooth adapter). As per suggested on the ArchWiki you can fix this by re-pairing the device each time, but there's actually another solution to not do so each time you choose to use your device on a different OS.

How can we accomplish this?

Easy, just pair the device on a OS and copy the bluetooth keys generated to the other OS so our device doesn't notice the difference.

@halkyon
halkyon / cleanup-win10.ps1
Last active November 2, 2024 19:51
Cleanup Windows 10 Powershell script
##
## Windows 10 cleanup script.
## Remove dodgy tracking settings, unneeded services, all apps, and optional features that come with Windows 10. Make it more like Windows 7.
## NOTE: this was tested on Creators Update (1703) and Fall Creators Update (1709). Some of this may not work as expected on newer versions.
##
## Instructions
## 1. Run this script (under Powershell as Administrator):
## powershell -ExectionPolicy Bypass .\cleanup-win10.ps1
## 2. Let it run through, you may see a few errors, this is normal
## 3. Reboot
@santisbon
santisbon / Update-branch.md
Last active October 16, 2024 09:09
Deploying from #Git branches adds flexibility. Bring your feature branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master.