Skip to content

Instantly share code, notes, and snippets.

View Programmerino's full-sized avatar

Davis Davalos-DeLosh Programmerino

View GitHub Profile
@Programmerino
Programmerino / mozc on Clear Linux.md
Last active March 14, 2024 20:13
Guide to use mozc on Clear Linux with GNOME on Wayland

There are other guides on how to do this, but they are pretty clunky (I believe I saw one using a virtual Ubuntu environment?). The below guide works for using mozc with GNOME on Wayland, although I expect that it can be easily adapted for other environments.

Step 1: Install Nix

I use Nix to supplement swupd for less often-used packages. I recommend using the Determinate Systems installer (for this guide, you will need flakes enabled which this automatically does for you).

Step 2: Install Mozc

If you don't have Home Manager installed:

nix profile install nixpkgs#ibus-engines.mozc

Otherwise, add it to your home.packages.

Step 3: Set IBus Environment Variables

@Programmerino
Programmerino / DrawableCanvasElement.js
Created December 3, 2022 10:23 — forked from davidwhitney/DrawableCanvasElement.js
Want to draw with your mouse or a finger in your browser? Here, use this.
class DrawableCanvasElement {
constructor(canvasElementId) {
this.canvasElementId = canvasElementId;
this.paintCanvas = document.getElementById(canvasElementId);
this.paintContext = this.paintCanvas.getContext("2d");
this.activeColour = "black";
this.dragging = false;
this.cursorPoint = { x: 0, y: 0 };
@Programmerino
Programmerino / gist:b6de9e9ca0a717cf01be8d8de2190e4e
Last active February 9, 2022 22:08
Clear Linux FFMPEG Configure
./configure --prefix=/usr/local --enable-shared --extra-cflags="-I/opt/cuda/include" --extra-ldflags="-L/opt/cuda/lib64" --enable-lto --disable-rpath --enable-gpl --enable-version3 --enable-nonfree --disable-static --disable-stripping --enable-gray --enable-alsa --enable-bzlib --enable-gcrypt --enable-gmp --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-libjack --disable-libopencv --enable-libopenjpeg --disable-libopenvino --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librtmp --enable-libsmbclient --enable-libsnappy --enable-libspeex --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --disable-libtls --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxml2 --enable-libzmq --enable-lzma --disable-mbedtls --enable-openal --enable-opencl --enable-opengl --dis
{ stdenv
, stdenvNoCC
, lib
, symlinkJoin
, runCommand
, curl
, cacert
, unzip
, icu
, openssl
@Programmerino
Programmerino / Program.fs
Created March 23, 2021 02:25
F# Coalesce (based off of the Rust Itertools version)
let rec coalesce f lst =
match lst with
| (x :: y :: zs) ->
match f x y with
| Some a -> coalesce f (a :: zs)
| None -> x :: coalesce f (y :: zs)
| _ -> lst
@Programmerino
Programmerino / Program.fs
Created January 4, 2021 04:32
F# List Operator Library Benchmark
module Program
open System
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
open FSharp.Collections.ParallelSeq
open BenchmarkDotNet.Validators
open BenchmarkDotNet.Configs
open BenchmarkDotNet.Validators
open FSharp.Control
@Programmerino
Programmerino / gist:76705ef6f42c12f49e2b8995cf16d5ce
Created July 8, 2018 23:01
BadWindow (invalid Window parameter)
pids... [2582]
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 20 (X_GetProperty)
Resource id in failed request: 0xa16
Serial number of failed request: 7
Current serial number in output stream: 7