Skip to content

Instantly share code, notes, and snippets.

View kleber-gueriero's full-sized avatar

Kleber Nascimento Gueriero kleber-gueriero

  • Brazil
  • 00:40 (UTC -03:00)
View GitHub Profile
@itkrt2y
itkrt2y / association.rb
Last active September 3, 2024 11:45
Association dataloader with graphql-ruby
# official docs: https://graphql-ruby.org/dataloader/sources.html
# app/graphql/sources/association.rb
class Sources::Association < ::GraphQL::Dataloader::Source
def initialize(association_name, scope = nil)
@association_name = association_name
@scope = scope
end
def fetch(records)
@andrebrait
andrebrait / keychron_linux.md
Last active August 4, 2025 20:42
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.

@mreichelt
mreichelt / build.gradle
Last active January 22, 2019 12:47
Example of build.gradle where the signing config comes from system environment variables
android {
signingConfigs {
release {
// export these as environment variables like ORG_GRADLE_PROJECT_MYAPP_RELEASE_STORE_FILE
// (prefix 'ORG_GRADLE_PROJECT_' is needed for Gradle project properties)
storeFile rootProject.file('app/' + project.findProperty('MYAPP_RELEASE_STORE_FILE'))
storePassword project.findProperty('MYAPP_RELEASE_STORE_PASSWORD')
keyAlias project.findProperty('MYAPP_RELEASE_KEY_ALIAS')
keyPassword project.findProperty('MYAPP_RELEASE_KEY_PASSWORD')
}
@zulhfreelancer
zulhfreelancer / upgrade.md
Last active February 17, 2023 00:42
How to upgrade Heroku Postgres database plan?
  1. Assuming you have multiple Heroku apps and Git remote like so:
development https://git.heroku.com/xxx.git (fetch)
development https://git.heroku.com/xxx.git (push)
origin      [email protected]:xxx/xxx.git  (fetch)
origin      [email protected]:xxx/xxx.git  (push)
production  https://git.heroku.com/xxx.git (fetch)
production  https://git.heroku.com/xxx.git (push)
staging https://git.heroku.com/xxx.git (fetch)