Skip to content

Instantly share code, notes, and snippets.

View ctrlcctrlv's full-sized avatar
🛠️
happy hacking

Fredrick Brennan ctrlcctrlv

🛠️
happy hacking
View GitHub Profile
@ctrlcctrlv
ctrlcctrlv / MAPACHE_AA.txt
Last active May 24, 2022 06:45
MAPACHE SJIS AA (you need to display it in IPAMonaPGothic for it to look right!) マップァチェ SJIS AA (IPAMonaPGothicで表示しないと正しく表示さ れない!)
                                                  
                                                  
                                                  
                                                  
                           ,,==l|                      
                          /' ̄ |||__                     
      _,,,...---____          _,,イ     ```ー―=lll               
     ,,r''´   _ 三|||= ̄`\       f'´     _ ___ ___\/               
    j[|||    ||||||||     \    {^     _O` ,O_)                 
  〈|||||    ||||||||    ||||| ̄|||     \       ω )ll l__                
@ctrlcctrlv
ctrlcctrlv / sticker_meta.md
Last active July 9, 2022 01:43
SFNT `meta` tags and their meanings in sticker pack fonts [SPEC DRAFT]

SFNT meta tags and their meanings in sticker pack fonts

None of these are needed and only make it easier for software to handle sticker pack fonts.

We use a single meta tag: StkF.

If defined with any value beginning with disambiguator "!FRBSTICKERSPEC", marks the font as a sticker pack font. After the disambiguator, the value is a JSON object. It includes:

  • "version" string : "v0" # not yet finalized
  • "authors" []Author : sticker fonts are likely to contain art by multiple artists. This is an array of Author objects.
@ctrlcctrlv
ctrlcctrlv / mariam.xml
Created April 9, 2022 04:01
Mariam Soulakiotis Polly SSML
<?xml version="1.0"?>
<speak>
<p>Abbess Mariam <phoneme alphabet="ipa" ph="suːlɒkiːoʊtiː">Soulakiotis</phoneme> (born c. 1883, died 23 November 1954;), born with the name Marina <phoneme alphabet="ipa" ph="suːlɒkiːoʊ'toʊː">Soulakiotou</phoneme>, known both to her followers as Mariam of <phoneme alphabet="ipa" ph="kɛrə'teɪ'ə">Keratea</phoneme>, and in contemporary media pejoratively as "Mother <phoneme alphabet="ipa" ph="ræˈspu'tiːn">Rasputin</phoneme>", was a Greek Old Calendarist Eastern Orthodox abbess who was found guilty of numerous counts of serial murder, fraud and other crimes, which public prosecutors of the Kingdom of Greece alleged she committed against both laypeople and other nuns in her abbey between 1939 and her arrest in December 1950.</p>
<p>During the time period of the crimes she was convicted of, <phoneme alphabet="ipa" ph="suːlɒkiːoʊtiː">Soulakiotis</phoneme> was neither a member of the mainstream Greek Orthodox Church nor in communion with the other, larger Old Calendarist group, the "Flo
@ctrlcctrlv
ctrlcctrlv / jeopardy_fursona.sh
Last active March 26, 2022 14:55
ffmpeg jeopardy thinking music generator
#!/bin/bash
function ffstreamlength ()
{
ffprobe -print_format json -show_streams "$1" 2> /dev/null |\
jq '.streams[]|select(.codec_type=="audio")|.tags.DURATION' -r |\
awk 'BEGIN { FS=":" } {printf "%.0f\n", ($1*60*60)+($2*60)+$3}'
}
COL=010b79
@ctrlcctrlv
ctrlcctrlv / inkscape_guidelines_b0rkd.diff
Created February 1, 2022 09:13
Inkscape issues №356, №615, №1180 fixed—I think.
diff --git a/src/file-update.cpp b/src/file-update.cpp
index c363f19..962a6e7 100644
--- a/src/file-update.cpp
+++ b/src/file-update.cpp
@@ -306,19 +306,36 @@ bool sp_file_save_backup( Glib::ustring uri ) {
return return_value;
}
+// See if we need to offer the user a fix for the 90->96 px per inch change.
+// std::cout << "SPFileOpen:" << std::endl;
@ctrlcctrlv
ctrlcctrlv / gen_hwd.sh
Created January 27, 2022 10:00
Generate Hellworld Dispatch episode
#!/bin/bash
# Generate Hellworld Dispatch episode
EP=$1
# Height of the video frames we tell ffmpeg to generate. We cut off bottom half to make mountains.
WAVESHEIGHT=512
# lol if u don't have an NVIDIA card remove prime-run and the nvidia wankery
NVIDIA_ARGS='-vsync 0 -hwaccel cuda -hwaccel_output_format cuda'
NVIDIA_RUNNER=prime-run
@ctrlcctrlv
ctrlcctrlv / clap_issue_1820.rs
Created October 25, 2021 14:15
Solution to clap issue #1820 (having an argument that is both a flag and positional)
use clap::{self, App, AppSettings, Arg};
fn main() {
let matches = App::new("glif2svg")
.setting(AppSettings::ArgRequiredElseHelp)
.version("0.1.0")
.author("Fredrick R. Brennan <copypasteⒶkittens⊙ph>; MFEK Authors")
.about("Convert between glif to SVG")
.arg(Arg::with_name("input_file")
.short("in")
#!/bin/bash
FN=lines2 # input file
OUTP=`(mecab -Oyomi | nkf -h1 -w | awk '{ORS="\n"; print $s "\t" NR;}' | sort) < "$FN"`;
OUTI=$(echo "$OUTP" | awk -F "\t" '{ if (ff != substr($s, 1, 1)) { ff=substr($s, 1, 1); print ff };'\
'{ system("sed "$NF"q\\;d '"$FN"'") }}');
OUTF=$(egrep -v '^[A-Za-z]+' <<< "$OUTI" && egrep '^[A-Za-z]+' <<< "$OUTI"); echo "$OUTF"
@ctrlcctrlv
ctrlcctrlv / search_example.c
Created April 26, 2021 11:22
Example of using functions in search.h
// gcc -g -O0 -lm -o /tmp/search_example /tmp/search_example.c
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <search.h>
int main(int argc, char* argv[]) {
// Create a hash table with 255 entries.
static LANGUAGE_ISO: &[Option<&[&str]>] = &[
Some(&["abq"]),
Some(&["abk"]),
Some(&["ach"]),
Some(&["acr"]),
Some(&["ady"]),
Some(&["afr"]),
Some(&["aar"]),
Some(&["ahg"]),
Some(&["aio"]),