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
@ruario
ruario / small-slackware.md
Last active May 3, 2024 20:14
A short guide to quickly setting up a small Slackware install

Setting up a "small" Slackware install

Intro

Before you do this, reconsider if it is really needed. More often than not, it isn't. This is why.

A common reason for attempting a minimal install is an expectation that Slackware will run faster. This is not true. Some example, (IMHO) valid, reasons for stripping back the install include:

  • Installing on a device with limited disk space, where it is hard to add additional storage
  • A setup where there is an ongoing cost to rent disk space (e.g. a Virtual Private Server)

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@matzegebbe
matzegebbe / clean_docker_nexus.sh
Last active May 3, 2024 20:07
Nexus Repository Manager keep the last X docker images delete all other
#!/bin/bash
REPO_URL="https://repository.xxx.net/repository/"
USER="admin"
PASSWORD="datpassword"
BUCKET="portal-docker"
KEEP_IMAGES=10
IMAGES=$(curl --silent -X GET -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -u ${USER}:${PASSWORD} "${REPO_URL}${BUCKET}/v2/_catalog" | jq .repositories | jq -r '.[]' )
@coaxial
coaxial / README.md
Last active May 3, 2024 20:06
unpinning SSL certs on Android apps with Frida to inspect network traffic with mitmproxy

Most of the time, applications won't pin the certificate. Running mitmproxy and passing all Android traffic through it is as simple as adb connect <IP> && adb shell settings put global http_proxy <mitmproxy host>:<mitmproxy port> (or use Android's UI)

Some applications, however, pin the certificate and will refuse to do any network calls if using mitmproxy.

Luckily, Frida is here!

This assumes Android x86 is running in a VM, that you are a developer in Android (tap the build version enough times), adb debugging is enabled, and that android tools are installed on the host.

  • start mitmproxy on host
  • visit mitm.it on the target (after setting the proxy) and install the spoofed cert
@jl2
jl2 / mkhelix.py
Created May 15, 2012 19:31
Python script using CATIA's COM interface to create a product structure containing 200 cubes arranged in a helix.
#!/usr/bin/env python3
import sys
import array
import math
import random
import os.path
import win32com.client
def get_catia():
# Source: https://gist.github.com/2dad051fe41bd2bbcf94eda74386ce49
#############################################
# KEDA: Kubernetes Event-Driven Autoscaling #
# https://youtu.be/3lcaawKAv6s #
#############################################
# Additional Info:
# - KEDA: https://keda.sh
# - Robusta: https://robusta.dev
@chabala
chabala / using-google-takeout.md
Last active May 3, 2024 20:05
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
@ProcessEight
ProcessEight / automated-refactoring.md
Last active May 3, 2024 20:05
Discussion of automated refactoring processes to bring legacy codebases up to date
@zdebra
zdebra / throttled_transport.go
Created June 15, 2021 14:48
NewThrottledTransport wraps transportWrap with a rate limitter, improvement of https://gist.github.com/MelchiSalins/27c11566184116ec1629a0726e0f9af5 since it allows use of *http.Client
package main
import (
"net/http"
"time"
"golang.org/x/time/rate"
)
// ThrottledTransport Rate Limited HTTP Client