Skip to content

Instantly share code, notes, and snippets.

View Ameobea's full-sized avatar

Casey Primozic Ameobea

View GitHub Profile
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@wmcmurray
wmcmurray / BasicCustomShader.js
Last active June 2, 2024 20:44
A basic example of a ThreeJS (r108) ShaderMaterial with shadows, fog and dithering support.
import { mergeUniforms } from 'three/src/renderers/shaders/UniformsUtils.js'
import { UniformsLib } from 'three/src/renderers/shaders/UniformsLib.js'
export default {
uniforms: mergeUniforms([
UniformsLib.lights,
UniformsLib.fog,
]),
@baryluk
baryluk / mesa-build.py
Last active June 7, 2024 01:01
Build Mesa from git and libdrm git for Debian. amdgpu build 64-bit and 32-bit for Debian stable, testing and unstable, and possibly Ubuntu, Mint, PopOS, etc. No root required. (well sudo to install some build dependencies required tho). Currently a bit borked on Debian stable (requires newer meson).
#!/usr/bin/env python3
# A simple script to build 64-bit and 32-bit Mesa and libdrm on amd64 Debian
# stable, Debian testing, Debian unstable, and possibly some Ubuntu versions
# with some tweaks.
#
# libdrm is build too, because often version right now in Debian sid and experimental
# is too old for current mesa git repo. Also it is nice to build debug
# versions of libdrm when troubleshooting some crashes and bugs.
#
@serverwentdown
serverwentdown / sidekiq_
Last active January 5, 2023 06:08
Munin Sidekiq plugin. Requires `perl-redis`. Install as `sidekiq_APP_NAME`
#!/usr/bin/perl -w
=head1 NAME
sidekiq - Get Sidekiq queue statistics from a Redis node
=head1 APPLICABLE SYSTEMS
Any Redis host with a Sidekiq application