Skip to content

Instantly share code, notes, and snippets.

@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
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 23, 2024 07:35
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@jchv
jchv / configuration.nix
Last active February 14, 2023 05:22
Nix configuration for VGA passthrough
{ config, pkgs, lib, ... }:
{
# IOMMU configuration
boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ];
boot.kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
boot.extraModprobeConfig = ''
options vfio-pci ids=10de:13c2,10de:0fbb
options kvm ignore_msrs=1
'';
@Belval
Belval / install_gitea.sh
Last active November 16, 2021 23:03
A script to install gitea and run it as a service on Ubuntu
#!/bin/sh
mkdir gitea
cd gitea/
# Replace this with whatever version is relevant now.
wget https://dl.gitea.io/gitea/1.4.1/gitea-1.4.1-linux-amd64
# Same here
mv gitea-1.4.1-linux-amd64 gitea
@DevKhokhar
DevKhokhar / indian_women_in_data.md
Last active December 23, 2021 09:22
List of Indian women who represent the data space in India and globally

Below is a list of Indian women who have contributed it to the data space in India and globally - be it Data Strategy, Data Engineering, Machine Learning, Artificial Intelligence, Data and Public Policy, or any other related field. Please feel free to add in the missing names. I have arranged the names alphabetically for easy searchability. Please do add the name, twitter handle (if available), linkedin profile (if available), link(s) to their public blogs/videos (if available) and the area of specialization. Also, don't forget to add in your name below to the link of contributors. This isn't an individual's effort - this will work only if more and more people contribute. Thanks!

*Note: I have started with just the Indian women here because I wanted to bring attention to some of the inspirational women at the national level. However, if you want to replicate it for any other country or even at a global level, please feel free to either add in into the same list (adding an additional column of course) or cr

@1kastner
1kastner / reflect.py
Last active April 3, 2024 13:52 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@anthonyclarka2
anthonyclarka2 / borg-backup-enhanced.sh
Created August 14, 2017 17:06
Borg backup script with exit code checking and status push to Zabbix
#!/bin/sh
# Enhanced backup script
# Sends messages to Zabbix based on exit code of borg executable
#
# anthonyclark AT G MAIL
# Shellcheck will still kvetch at you if notices are enabled
#
# This script will not work AS-IS but is only provided as such
# NO WARRANTIES
# This work is licensed under a Creative Commons Attribution 4.0 International License.
@nickbutcher
nickbutcher / MainActivity.java
Last active August 20, 2021 16:15
A quick sample of the new physics-based animation library added in Support Library 25.3.0 docs: https://developer.android.com/reference/android/support/animation/package-summary.html output: https://twitter.com/crafty/status/842055117323026432
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@thehesiod
thehesiod / async_worker_pool.py
Last active June 30, 2023 11:01
Asynchronous Worker Pool, allows for limiting number of concurrent tasks
import asyncio
from datetime import datetime, timezone
import os
def utc_now():
# utcnow returns a naive datetime, so we have to set the timezone manually <sigh>
return datetime.utcnow().replace(tzinfo=timezone.utc)
class Terminator:
pass
@bburky
bburky / coursera.sh
Last active June 30, 2016 17:30
Automatically configure a VM download Coursera courses
#!/bin/bash
# Automatically configure a VM download Coursera courses.
# This script works as a user data file for use with a cloud VM.
# This script will resume downloading if the VM is restarted.
# This script works with Debian jessie (or possibly Ubuntu with systemd).
# You must enroll in each course and accept the Honor of Code of each course
# before you can download them.