Skip to content

Instantly share code, notes, and snippets.

View djrobby's full-sized avatar

Robby Dhillon djrobby

  • Detroit, MI - USA
View GitHub Profile
kj800x / Hacking the LG Monitor's
Last active May 3, 2024 20:14
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
akre54 / renderer.ts
Created February 1, 2023 21:39
TheatreJS keyframes and WebMMuxer video encoding
import { createRafDriver, ISheet, val } from '@theatre/core'
import WebMMuxer from 'webm-muxer'
export const rafDriver = createRafDriver({ name: 'Hubble rAF driver' })
export const useRenderer = ({
fps = 30,
bitrate = 1e6,
}: {
yellow1912 /
Last active April 25, 2022 20:16
Install libvips on Ubuntu
echo ""
echo "---------------------------------"
echo "---------------------------------"
echo ""
echo "-----------------------"
echo "Installing cgif"
dux /
Last active January 6, 2023 18:18
Ruby Sequel switch databases on the fly
  1. I wanted to keep global user data in one database and org data in separate database
  2. I want to use Sequel models in the same way as I was using a single databases
  3. I need simple interface to define that model data resides in Organization and not Global DB

Only possible solution I found is by patching Sequel native methods. If anyone knows better way to do it, like injecting DB connection just before dataset executes a query, please comment and explain.

I tried to use "sharding" and "arbitrary_servers", but that is not what I want. I have 1000nds of orgs, and 1000nds of DBs. I need connections to be fuly dynamic and I want to define request context once when request starts in Thread.current.

rnyrnyrny / logger.go
Last active March 20, 2023 14:26
log using uber zap and lumberjack (zapcore.AddSync version)
// thanks to:
// Please test and debug it before putting it in production.
package logger
import (
ricardozea / script.js
Last active January 4, 2023 02:13
Smooth scroll to top of page (Improved!)
window.scrollTo({top: 0, behavior: "smooth"});
GLMeece /
Last active October 10, 2022 21:03
Typescript Function Syntaxes

In JavaScript itself, there are lots of ways to write functions. Add TypeScript to the mix and all of a sudden it's a lot to think about. So with the help of some

dux / _
Last active January 6, 2023 18:20
Capistrano replacement via common rake tasks
you will need
* hash_wia gem
# to fully deploy application
rake remote:deploy
ssamjh / icecastkh-proxy.conf
Last active September 30, 2023 06:24
icecast-kh Nginx config with IP-Forwarding
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/nginx/ssl/;
ssl_certificate_key /etc/nginx/ssl/;
dux / paginate.rb
Last active January 6, 2023 18:21
Trivial and fast (does not execute count or any other unneeded requests) Ruby / Rails / Sinatra / Lux pagination
# @list = Paginate.set User, size: 40, name: :upage
# Paginate.render @list
# using:
module Paginate
extend self
def set rset, opts={}
opts[:size] ||= 20
opts[:name] ||= :page