Skip to content

Instantly share code, notes, and snippets.

View robyscar's full-sized avatar

R1oby robyscar

  • Bangkok
View GitHub Profile
@robyscar
robyscar / keychron_linux.md
Created August 26, 2022 10:56 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

@robyscar
robyscar / multithread_rsync.sh
Created November 9, 2022 00:58 — forked from DonRichards/multithread_rsync.sh
Multi-thread Rsync. Don't forget to $ chmod +x multithread_rsync.sh and change the paths & server. And then run it like: $ ./multithread_rsync.sh
#!/usr/bin/env bash
# RSYNC /usr/local/bin/rsync
RSYNC_PROG=$(which rsync)
# Note the important use of --relative to use relative paths so we don't have to specify the exact path on dest
RSYNC_OPTS="-aP --numeric-ids --progress --human-readable --exclude=.git --relative --compress"
export RSYNC_RSH="ssh -T -c aes128-ctr -o Compression=no -x"
@robyscar
robyscar / pihole-json-2-adguard.py
Created November 20, 2022 09:02 — forked from BeneKenobi/pihole-json-2-adguard.py
Python script to convert an exported whitelist of Pi-hole (json) to the format used by AdGuard Home
import json
with open('whitelist.exact.json') as pihole_whitelist_file:
whitelist = json.load(pihole_whitelist_file)
with open('adguard.txt', 'w') as adguard_file:
for item in whitelist:
adguard_file.write(f'@@||{item["domain"]}^\n')
@robyscar
robyscar / technet-convert_alphanumeric_string_to_the_NATO.ps1
Created March 1, 2023 14:33 — forked from tommymaynard/technet-convert_alphanumeric_string_to_the_NATO.ps1
Convert Alphanumeric String to the NATO Phonetic Alphabet Equivalent
<#
TechNet Contribution: Convert Alphanumeric String to the NATO Phonetic Alphabet Equivalent
Previous link: https://gallery.technet.microsoft.com/Convert-Alphanumeric-8c1d6a79
Downloaded: 858 times (as of 05/21/2020)
There was a post in the TechNet Forum about needing a solution to convert a string into the NATO phonetic alphabet
equivalent (link). I really liked the project and quickly wrote out an advanced function in Windows PowerShell to
accompany the VBS solution that was also posted. Please let me know if there are any problems that need correcting.
The 1.3 version will speak the results, if the -Speak switch parameter is included when the function is run.
@robyscar
robyscar / gist:6c38fea915c4680f8f92a0ec668235d5
Last active December 12, 2023 11:33 — forked from pashinin/gist:f98bc62a727fb517b48baf9d443bcebb
peehole windows shit hostnames to block
# -*- mode:conf-unix -*-
### hosts win10 extra
### More info: https://github.com/crazy-max/WindowsSpyBlocker
0.0.0.0 answers.microsoft.com
0.0.0.0 apps.skype.com
0.0.0.0 az361816.vo.msecnd.net
0.0.0.0 az512334.vo.msecnd.net
0.0.0.0 cdn.content.prod.cms.msn.com
0.0.0.0 choice.microsoft.com