Skip to content

Instantly share code, notes, and snippets.

View Larpon's full-sized avatar
💭
Out now https://blackgrain.dk/non/

Larpon

💭
Out now https://blackgrain.dk/non/
View GitHub Profile
@Larpon
Larpon / gen_embeds_from_dir.vsh
Created October 10, 2023 13:11
Embedding the contents of a directory with a V script
mut v_code := '
module main
import v.embed_file
fn get_embedded_files() []embed_file.EmbedFileData {
mut embedded_files := []embed_file.EmbedFileData{}
'
output_file := 'auto_generated_embedded_files.v'
@Larpon
Larpon / find_ct_values.vsh
Created June 30, 2022 10:45
Find and sum all V compile time $if / $else values in a file or dir
#!/usr/bin/env -S v
module main
import os
struct CompInfo {
pub mut:
file string
line string
@Larpon
Larpon / make_rpi4.sh
Last active November 13, 2023 12:50
#!/bin/bash
## should be run in V's main repo folder!
rm -rf tinycc/
rm -rf thirdparty/tcc/
pushd .
git clone git://repo.or.cz/tinycc.git
@Larpon
Larpon / large_toml_file_test.toml
Created November 26, 2021 10:57
Large TOML file
This file has been truncated, but you can view the full file.
[[Toml]]
ID = "5888fed8b0546a1eb0cfe5d4"
Index = 0
GUID = "d718f1a0-4446-484d-b399-4a0b7e6c6f7b"
IsActive = false
Balance = "$1,945.41"
Picture = "http://placehold.it/32x32"
Age = 27
EyeColor = "green"
Company = "BIZMATIC"
@Larpon
Larpon / krita-pip.sh
Last active March 4, 2019 10:58
Patch a Krita appimage with a pip package
#!/usr/bin/env bash
# Add pip packages to a Krita .appimage
# - as descriped here https://gist.github.com/Larpon/e81ed68895bdba35098d9d84688ac01e
#
# The script is working on a copy of the appimage to ensure any failed
# runs doesn't make your krita unusable
# You can patch an appimage multiple times
# TODO support installing multiple packages in one go
@Larpon
Larpon / python-package-patch-krita-appimage.md
Last active September 27, 2018 10:14
Add PIL (pillow) package to a Krita 4 appimage