Skip to content

Instantly share code, notes, and snippets.

@jkugler
jkugler / gist:4928e3239edad10b262d95a20c144768
Last active January 19, 2023 07:12
Reducing resolution on HiDPI/4K displays for text-based installers
I recently installed Ubuntu server on a laptop with a 4K display. While the installer appears to be in text, it apparently uses a graphical mode, and setting vga=799 in the kernl boot parameters did not work.
To decrease the resolution, you have to pass a kernel boot parameter with the monitor "name" as seen by edid.
You can do this to list monitors without xrandr
find /sys/devices -name "edid"
That will produce a listing like this:
@joemiller
joemiller / renewer.go
Created June 16, 2021 15:57
demo of vault token renewer go routine from internal project
type VaultDriver struct {
vaultClient *vaultapi.Client
project string
}
func (d VaultDriver) TokenRenewer(ctx context.Context) error {
renewer, err := d.vaultClient.NewRenewer(&vaultapi.RenewerInput{
Secret: &vaultapi.Secret{
Auth: &vaultapi.SecretAuth{
ClientToken: d.vaultClient.Token(),
@bdashrad
bdashrad / interviewer_questions.md
Last active September 3, 2023 13:28
Interviewer Questions

Questions to ask your interviewer

Management

  • What problem do you solve and why would I give you money to solve it?
  • When’s the last time someone went above and beyond the call of duty at the company/on the team? What did they do?
  • What are the current goals that the company is focused on, and how does this team/role work to support hitting those goals?
  • What are the projects in this company you think are really key to its future and how would a motivated person go about getting on them?
  • What do you see as your largest technical challenge currently?
  • Pain Points beyond headcount
  • What is a project you wish a new member of the team could take on?
@ldez
ldez / gmail-github-filters.md
Last active April 3, 2024 11:53
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@nerdalert
nerdalert / Netfilter-IPTables-Diagrams.md
Last active May 9, 2024 03:52
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active May 6, 2024 16:55
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts, will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 email threads in a single API call.
This script fetches 400 threads in case 500 threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete