Skip to content

Instantly share code, notes, and snippets.

@andrebrait
andrebrait / keychron_linux.md
Last active July 20, 2024 21:06
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.

@augustl
augustl / core.txt
Created November 25, 2017 23:03
boxstarter
Disable-UAC
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -Lock
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -AlwaysShowIconsOn
port module Spelling exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import String
main =
@trygvea
trygvea / gist:a35999de8ee0ee14bcc5
Created December 15, 2015 08:44
Some groovy/java utilities for HBase shell. Note that IntelliJ has groovy console built-in!
import java.nio.ByteBuffer
public static byte[] bytes(long l) {
ByteBuffer.allocate(Long.BYTES).putLong(l).array();
}
def pretty(byte[] b) {
def sb = new StringBuilder()
for(i=0;i<b.length;i++){
sb.append(String.format("\\x%02X", b[i]))
@ygotthilf
ygotthilf / jwtRS256.sh
Last active July 22, 2024 13:05
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@samertm
samertm / .emacs
Last active March 31, 2019 16:21
Tricking Out Emacs for Go
;; from https://www.youtube.com/watch?v=r6j2W5DZRtA
;; get the following packages ("M-x package-list-packages"):
;; go-mode
;; go-eldoc
;; company-mode
;; company-go
;; get the following go programs (run each line in your shell):
;; go get golang.org/x/tools/cmd/godoc
;; go get golang.org/x/tools/cmd/goimports
;; go get github.com/rogpeppe/godef
@pjobson
pjobson / remove_mcafee.md
Last active March 26, 2024 04:26
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.

@twasink
twasink / Description
Created June 6, 2012 11:55
Spring, Hibernate, HSQLDB and automatically creating tables
An example of using Spring and Hibernate together to automatically create a HSQLDB in-memory database for testing hibernate mappings.