Skip to content

Instantly share code, notes, and snippets.

View leoluk's full-sized avatar

leoluk leoluk

View GitHub Profile
@mansu
mansu / kafka-server.properties
Created February 4, 2022 23:21
Slack Kafka server config
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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
@jinwoo-jeon0
jinwoo-jeon0 / startup.meta
Created September 26, 2021 07:02
...\Red Dead Redemption 2\x64\data
<?xml version="1.0" encoding="UTF-8"?>
<CDataFileMgr__ContentsOfDataFileXml>
<disabledFiles />
<includedXmlFiles itemType="CDataFileMgr__DataFileArray" />
<includedDataFiles />
<dataFiles itemType="CDataFileMgr__DataFile">
<Item>
<filename>platform:/data/cdimages/scaleform_platform_pc.rpf</filename>
<fileType>RPF_FILE</fileType>
</Item>
@Shastick
Shastick / land-check.sh
Last active May 17, 2023 09:23
Contains a (draft) pre-receive commit hook to be used on a phabricator instance in order to verify that inbound commits correspond to the content of their Diff.
#!/bin/bash
set -eo pipefail
# Note to readers: this hook lives within a phabricator instance that runs from a xiimoon/phabricator docker image.
# Additionally, you'll need:
# - jq
# - cmp
# - mounting a valid conduit api token to /env_dir/PHABRICATOR_CONDUIT_TOKEN
#
@probonopd
probonopd / Wayland.md
Last active July 23, 2024 16:22
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not e

@UrsaDK
UrsaDK / Caching multi-stage builds in GA.md
Last active July 9, 2024 14:34
Speed up your multistage builds in GitHub Actions

Caching multi-stage builds in GitHub Actions

Caching Docker builds in GitHub Actions is an excellent article by @dtinth which analyses various strategies for speeding up builds in GitHub Actions. The upshot of the article is a fairly decisive conclusion that the best two ways to improve build times are:

  1. Build images via a standard docker build command, while using GitHub Packages' Docker registry as a cache = Longer initial build but fastest re-build times.

  2. Build your images via docker integrated BuildKit (DOCKER_BUILDKIT=1 docker build), while using a local registry and actions/cache to persist build caches = Fastest initial build but slightly longer re-build times.

The problem

@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
'';
@jakecraige
jakecraige / git-push-to-target.sh
Last active April 11, 2019 22:53
Script to allow for some fancy git workflows as described in https://wchargin.github.io/posts/managing-dependent-pull-requests/. I've extended it to also have features to support a style described in https://jg.gg/2018/09/29/stacked-diffs-versus-pull-requests/ via the --pick(-p) option
#!/bin/sh
#
# git-push-to-target: Force push with lease this commit to a branch specified in its
# commit description like `branch: jake/my-branch`:
#
# `git-push-to-target --query` will do a dry run and print the branch name it detects
# `git-push-to-target --pick` will pick this to it's own branch off master and push.
#
# Usage within an interative rebase, add this after each commit that contains the branch directive:
# > exec git push-to-target
@rraval
rraval / postgres-collation.md
Last active December 6, 2023 16:25
PostgreSQL collation is a massive footgun

This is a slightly stripped down version from our internal bug tracker. The point of posting this publicly is part FYI, part peer review. I'm hoping someone can look at this, disagree, and tell me all the downsides of using the C locale or point out things I've misunderstood. The Recommendations section in particular is contextualized by our database serving a SaaS product for users from many different locales, thus making locale a render level concern. YMMV, caveat emptor, etc.


Collation defines the character ordering for textual data. For Postgres, https://www.postgresql.org/docs/current/static/locale.html:

The locale settings influence the following SQL features:

  • Sort order in queries using ORDER BY or the standard comparison operators on textual data
  • The upper, lower, and initcap functions
@savaki
savaki / main.go
Last active August 22, 2022 09:27
comparison of confluent-kafka-go vs sarama-cluster consumer performance
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
@staaldraad
staaldraad / webdavserv.go
Last active June 18, 2024 14:34
A small webdav server in go
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"golang.org/x/net/webdav"