Skip to content

Instantly share code, notes, and snippets.

View dr3mro's full-sized avatar

Dr Amr Osman dr3mro

View GitHub Profile
@santisbon
santisbon / Update-branch.md
Last active March 21, 2024 15:50
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.

@halkyon
halkyon / cleanup-win10.ps1
Last active June 28, 2024 08:50
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
@diffficult
diffficult / bluetoothdoubledipping.md
Last active July 17, 2024 10:51
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.

@p7cq
p7cq / Arch_Linux_Root_On_ZFS.md
Last active June 21, 2024 08:37
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>.

@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
@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]
    
@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
@raspberrypisig
raspberrypisig / CMakeLists.txt
Last active June 19, 2024 11:15
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)
@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
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active July 24, 2024 08:05
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus