Skip to content

Instantly share code, notes, and snippets.

@andreasonny83
andreasonny83 / RELEASE-NOTES.md
Last active May 11, 2024 19:05
Release Notes Template

Release Notes Template

Based off https://palantir.quip.com/pzRwAVr1bpzf

Pro-tip: look through the github diff between the previous release to see what's changed. The commit titles should give an outline of what's happened.

Upgrade Steps

  • List out, as concretely as possible, any steps users have to take when they upgrade beyond just dumping the dependency.
  • Write pseudocode that highlights what code should change and how.
@karpathy
karpathy / min-char-rnn.py
Last active May 11, 2024 19:04
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@uchagani
uchagani / proxmox_usb_passthrough.md
Last active May 11, 2024 19:01
Proxmox USB Passthrough
#
# stopwords.txt
#
# Freely available stopword list, balancing coverage and size.
#
# From http://www.lextek.com/manuals/onix/stopwords1.html
a
about
above
across
@meawoppl
meawoppl / thumbnailer.py
Last active May 11, 2024 18:55
Nautilus Thumbnail Generator. Python 3 scalable and fast.
#!/usr/bin/python3
import concurrent.futures
import hashlib
import os
import sys
import gi
gi.require_version('GnomeDesktop', '3.0')
from gi.repository import Gio, GnomeDesktop
@rxaviers
rxaviers / gist:7360908
Last active May 11, 2024 18:54
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@dbehnke
dbehnke / luksloopback.sh
Created December 30, 2014 20:25
luks encryption with loopback file
#!/bin/bash
loopdevice=/dev/loop0
loopfile=crypt.loop
#megabytes
loopsize=256
#/dev/mapper/xxxxx when open
cryptmapper=myCrypt
Artisan
// Displays help for a given command
php artisan --help OR -h
// Do not output any message
php artisan --quiet OR -q
// Display this application version
php artisan --version OR -V
// Do not ask any interactive question
php artisan --no-interaction OR -n
// Force ANSI output
@abel0b
abel0b / install-linux-perf-on-wsl2.sh
Last active May 11, 2024 18:49
Install perf on WSL 2
apt install flex bison
git clone https://github.com/microsoft/WSL2-Linux-Kernel --depth 1
cd WSL2-Linux-Kernel/tools/perf
make -j8
sudo cp perf /usr/local/bin
@beginor
beginor / snowflake-id.sql
Last active May 11, 2024 18:48
Twitter Snowflake ID for PostgreSQL
CREATE SEQUENCE public.global_id_seq;
ALTER SEQUENCE public.global_id_seq OWNER TO postgres;
CREATE OR REPLACE FUNCTION public.id_generator()
RETURNS bigint
LANGUAGE 'plpgsql'
AS $BODY$
DECLARE
our_epoch bigint := 1314220021721;
seq_id bigint;