Skip to content

Instantly share code, notes, and snippets.

View stefanbildl's full-sized avatar

Stefan Bildl stefanbildl

  • Passau
  • 14:43 (UTC +01:00)
View GitHub Profile
@maratori
maratori / .golangci.yml
Last active December 5, 2025 13:50
Golden config for golangci-lint
# ==================================================================================================
#
# NOTICE
#
# This gist is no longer maintained. It was moved to repo:
#
# https://github.com/maratori/golangci-lint-config
#
# Full history and all v2 releases are preserved in the repo.
#
@dherges
dherges / lru-cache.ts
Last active November 17, 2025 20:56
Simple LRU Cache in TypeScript
class LruCache<T> {
private values: Map<string, T> = new Map<string, T>();
private maxEntries: number = 20;
public get(key: string): T {
const hasKey = this.values.has(key);
let entry: T;
if (hasKey) {
// peek the entry, re-insert for LRU strategy
@shayne
shayne / gist:47bf6dcec6d13653e4cbfeaab7f2e1b8
Created October 12, 2016 05:11
Copy terminfo to host
infocmp | ssh $remote "cat > $TERM.ti ; tic -o ~/.terminfo $TERM.ti"