Skip to content

Instantly share code, notes, and snippets.

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@Artefact2
Artefact2 / README.md
Last active May 3, 2024 07:05
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@dwilliamson
dwilliamson / MarchingCubes.js
Last active May 3, 2024 07:04
Marching Cubes Lookup Tables
//
// Lookup Tables for Marching Cubes
//
// These tables differ from the original paper (Marching Cubes: A High Resolution 3D Surface Construction Algorithm)
//
// The co-ordinate system has the more convenient properties:
//
// i = cube index [0, 7]
// x = (i & 1) >> 0
// y = (i & 2) >> 1
@smo0z
smo0z / ProtonLaunch.sh
Last active May 3, 2024 07:04
Proton Launch Script
#!/bin/sh
# Application path
APP_PATH="$(dirname "${BASH_SOURCE[0]}")"
cd "$APP_PATH"
# Executable file
APP_EXEC="$APP_PATH/.exe"
# Steam / IDs
@armornick
armornick / openicon.c
Created August 23, 2012 08:47
Draw an Image with SDL2
#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#define WIDTH 800
#define HEIGHT 600
#define IMG_PATH "exit.png"
int main (int argc, char *argv[]) {
@mondain
mondain / public-stun-list.txt
Last active May 3, 2024 06:59
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@allenhumphreys
allenhumphreys / CreateCroppedPixelBufferBiPlanar.c
Last active May 3, 2024 06:58
Functions in Swift/C to Crop and Scale CVPixelBuffers in the BiPlanar formats
CVPixelBufferRef createCroppedPixelBufferBiPlanar(CVPixelBufferRef srcPixelBuffer, CGRect croppingRect, CGSize scaleSize) {
OSType inputPixelFormat = CVPixelBufferGetPixelFormatType(srcPixelBuffer);
assert(inputPixelFormat == kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
|| inputPixelFormat == kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange);
size_t inputWidth = CVPixelBufferGetWidth(srcPixelBuffer);
size_t inputHeight = CVPixelBufferGetHeight(srcPixelBuffer);
assert(CGRectGetMinX(croppingRect) >= 0);
@zuyu
zuyu / ubuntu-install-gcc-6
Last active May 3, 2024 06:57
Install gcc 6 on Ubuntu
sudo apt update && \
sudo apt install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo apt update && \
sudo apt install gcc-6 g++-6 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
gcc -v
@Yengas
Yengas / README.md
Last active May 3, 2024 06:56
Creating Table of Contents by reading the folder and file structure of a git project

toc.py

This script reads the structure of your git project to create a markdown table of contents. You can use the output of this script to add a TOC to the README of your project.

Example folder structure:

.
├── Test
│   └── README.md
├── Test2
│   ├── README.md
@mackankowski
mackankowski / # How to create a bootable Windows 7, 8 ,10, 11 installer USB on MacOS - readme.md
Last active May 3, 2024 06:58
How to create a bootable Windows 7, 8, 10, 11 installer USB on macOS

How to create a bootable Windows 7, 8, 10, 11 installer USB on macOS

Run in Terminal:

  1. brew install wimlib - run, if wimlib is not installed yet (required for splitting large files)
  2. To identify target USB device, run: diskutil list
  3. Format USB drive: diskutil eraseDisk MS-DOS "$WIN_USB_NAME" MBR /dev/$DISK where $WIN_USB_NAME is a new volume name (e.g. WIN) and $DISK is a target disk identificator (e.g. disk5). Alternatively, you can try GTP partititon style instead of MBR (recommended for UEFI = newer Windows distributions)
  4. To mount Windows installer image, run: hdiutil mount ~/Desktop/$WIN_INSTALLER_IMAGE.iso where $WIN_INSTALLER_IMAGE is installer image name.
  5. Copy all files to the USB drive, beside the "install" file (if it's over 4GB size): rsync -vha --exclude=sources/install.$EXT /Volumes/$WIN_INSTALLER_NAME/ /Volumes/$WIN_USB_NAME where $EXT is wim or esd, $WIN_INSTALLER_NAME is the mounted Windows installer volume name and $WIN_USB_NAME is target disk name.