Skip to content

Instantly share code, notes, and snippets.

View gelembungsahabat's full-sized avatar
:octocat:
Keqing Wangy

Muhammad Wildan gelembungsahabat

:octocat:
Keqing Wangy
View GitHub Profile
@andrebrait
andrebrait / keychron_linux.md
Last active June 16, 2024 19:44
Keychron keyboards on Linux + Bluetooth fixes

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

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

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 (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@claus
claus / _app.js
Created May 14, 2020 05:35
Restore scroll position after navigating via browser back/forward buttons in Next.js
import useScrollRestoration from "utils/hooks/useScrollRestoration";
const App = ({ Component, pageProps, router }) => {
useScrollRestoration(router);
return <Component {...pageProps} />;
};
export default App;
@kuamit5516
kuamit5516 / Fix-Slow-apt-get-update-Optimize-Kali-Linux-2019
Created January 22, 2019 12:00
Fix-Slow-apt-get-update-Optimize-Kali-Linux-2019-New-Working-Code
Open Terminal and type - leafpad /etc/resolv.conf
add this - nameserver 8.8.8.8
nameserver 8.8.4.4
save and exit
now open new terminal and type - leafpad /etc/apt/sources.list
add this - #Repositories :
deb http://kali.cs.nctu.edu.tw/kali kali-rolling main contrib non-free
deb-src http://kali.cs.nctu.edu.tw/kali kali-rolling main contrib non-free
now save and exit