Skip to content

Instantly share code, notes, and snippets.

View wpyoga's full-sized avatar

William Poetra Yoga wpyoga

View GitHub Profile
@kj800x
kj800x / Hacking the LG Monitor's EDID.md
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
@ChrisDobby
ChrisDobby / forwardRef.tsx
Created July 30, 2019 20:03
Example of React component in Typescript using forwarding refs
import * as React from "react";
const Forward = React.forwardRef((props, ref: React.Ref<HTMLDivElement>) => (
<div ref={ref} style={{ width: "100%", height: "30px", backgroundColor: "green" }} />
));
function ForwardRef() {
const divRef = React.useRef<HTMLDivElement>(null);
React.useEffect(() => {
@tienthanh2509
tienthanh2509 / install-openvpn-24.sh
Last active November 22, 2021 12:29
Install OpenVPN 2.4.x on Ubuntu 16.04 Xenial
curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add -
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
apt update
apt install -y openvpn
@lukasnellen
lukasnellen / 00-serial-console.md
Last active February 20, 2024 15:30
kvm serial console for virtual machine

Serial console for KVM based VM and IPMI serial channel

grub and kernel console

Set in /etc/default/grub:

...
###GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,115200n8 console=tty1"
GRUB_CMDLINE_LINUX=""
@upperstream
upperstream / httpserver.sh
Last active May 2, 2024 23:40
Simple HTTP Server (shell script)
#!/bin/sh
#
# Copyright (C) 2017 Upper Stream.
#
# See the bottom of this file for licensing conditions.
#
#set -x
set -e
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active May 4, 2024 15:04
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target