Skip to content

Instantly share code, notes, and snippets.

@yfkhar
yfkhar / freebsd-bluetooth-mouse.txt
Created February 6, 2022 19:21
Configure FreeBSD Bluetooth Mouse
Add to /boot/loader.conf:
ng_ubt_load="YES"
Add to /etc/rc.conf:
hcsecd_enable="YES"
sdpd_enable="YES"
bthidd_enable="YES"
Reboot, or run:
@yfkhar
yfkhar / Spree: Filter by brand.md
Created June 13, 2022 19:47 — forked from vsokolov/Spree: Filter by brand.md
Spree: Filter Products by properties

Fix 'scoped' error for Rails 4

error: undefined method 'scoped' solution:

# config/initializers/scoped.rb
class ActiveRecord::Base
  # do things the modern way and silence Rails 4 deprecation warnings
 def self.scoped(options=nil)

options ? where(nil).apply_finder_options(options, true) : where(nil)

@yfkhar
yfkhar / tm_properties
Created September 3, 2022 11:14 — forked from belgoros/tm_properties
TextMate 2 Settings
spellChecking = true
spellingLanguage = 'en'
softTabs = true
softWrap = false
invisiblesMap = "~ \t┊"
TM_STRIP_WHITESPACE_ON_SAVE = true
TM_GIT = "/usr/local/bin/git"
TM_RUBY = "/usr/local/var/rbenv/shims/ruby"
@yfkhar
yfkhar / fixmouselag.sh
Created May 25, 2023 14:59 — forked from rscircus/fixmouselag.sh
Fix bluetooth mouse lag on Ubuntu
#!/bin/bash
MouseIdentifierString="Mouse"
writeOpts() {
sudo cat <<'EOF' | sudo tee -a /var/lib/bluetooth/$1/$2/info
[ConnectionParameters]
MinInterval=6
MaxInterval=7
Latency=0
@yfkhar
yfkhar / patch-edid.md
Created February 21, 2024 11:17 — forked from ejdyksen/patch-edid.md
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):