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 / sile-superdefine.md
Last active August 1, 2020 19:51
sile-superdefine: README.md (draft)

A super \define for SILE

sile-superdefine levels up your \define command, making it more like LaTeX's!

It has these main benefits:

  1. It allows you to redefine commands, and make \define's that refer to themselves.
  2. It allows you to pass arguments from parents to children, via \args.
  3. It allows you to call \process multiple times.
  4. It allows you to feed it multiple \process blocks, see § \processn.
@ctrlcctrlv
ctrlcctrlv / skulpin crash.txt
Created September 5, 2020 12:45
skulpin crash
Finished dev [unoptimized + debuginfo] target(s) in 6.36s
Running `target/debug/examples/winit_imgui`
[2020-09-05T12:36:01Z INFO winit_imgui::imgui_support] Building ImGui font atlas
[2020-09-05T12:36:01Z INFO skulpin_renderer::instance] Finding vulkan entry point
DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /Users/developer/Workspace/skulpin/target/debug/examples/vulkan/implicit_layer.d:/etc/xdg/vulkan/implicit_layer.d:/tmp/macos-sdk-build/Vulkan-Loader/build/install/etc/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/Users/developer/.local/share/vulkan/implicit_layer.d
[2020-09-05T12:36:01Z INFO skulpin_renderer::instance] Found Vulkan version: (1, 2, 148)
DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /Users/developer/Workspace/skulpin/target/debug/examples/vulkan/implicit_layer.d:/etc/xdg/vulkan/implicit_layer.d:/tmp/macos-sdk-build/Vu
@ctrlcctrlv
ctrlcctrlv / bezctx.rs
Created September 21, 2020 03:53
raphlinus/spiro transpiled by c2rust
#![allow(dead_code, mutable_transmutes, non_camel_case_types, non_snake_case,
non_upper_case_globals, unused_assignments, unused_mut)]
#![register_tool(c2rust)]
#![feature(register_tool)]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct _bezctx {
pub moveto: Option<unsafe extern "C" fn(_: *mut bezctx, _: libc::c_double,
_: libc::c_double, _: libc::c_int)
-> ()>,
@ctrlcctrlv
ctrlcctrlv / Trust the scam.php
Created September 21, 2020 13:57
Post as Q on any vichan/OpenIB/infinity/Tinyboard-based imageboard
<?php
/* Post as Q in vichan/OpenIB. As r00t, put this in inc/instance-config.php.
* Works on any imageboard based on 8chan's software. lol */
event_handler("post", function($post) {
global $mod;
// Q's actual tripcode, per QANON.PUB
@define("Q_TRIPCODE", "!!Hs1Jq13jV6");
// ...Or whatever condition you want.
@ctrlcctrlv
ctrlcctrlv / PKGBUILD
Created October 16, 2020 08:50
AUR sile without system Luarocks
# Hacked up by: Fredrick Brennan <copypaste📧kittens✝ph>
# Maintainer: Caleb Maclennan <[email protected]>
# Maintainer: Adrián Pérez de Castro <[email protected]>
pkgname=sile-git
pkgdesc='Modern typesetting system inspired by TeX'
pkgver=0.10.12.r7.g1992646
pkgrel=1
arch=('x86_64')
url='https://www.sile-typesetter.org'
@ctrlcctrlv
ctrlcctrlv / ftp_servers_launch.sh
Created October 19, 2020 02:00
Launch an FTP server for each drive letter (MSYS2 / pyftpdlib)
#!/bin/bash
# A problem I commonly experience on Windows is wanting to access all files via
# another computer on the network running Linux or a phone running Android.
#
# While it is technically possible to use Samba shares, this is annoying to set
# up. Usually I just spawn FTP servers. But an annoying thing about Windows is
# its concept of multiple roots. While it's also possible to "mount" a drive
# letter under C:\ in Windows I think, this is also annoying to set up.
#
# So, I use this script. Running as:
@ctrlcctrlv
ctrlcctrlv / splash_20th_anniversary.diff
Last active November 7, 2020 11:17
FontForge 20ᵗʰ Anniversary Splash Diff WIP
diff --git a/fontforgeexe/startui.c b/fontforgeexe/startui.c
index eca0b41ca..a3ae02268 100644
--- a/fontforgeexe/startui.c
+++ b/fontforgeexe/startui.c
@@ -206,99 +206,74 @@ static void InsCharHook(GDisplay *gd,unichar_t ch) {
extern GImage splashimage;
static GWindow splashw;
static GTimer *autosave_timer, *splasht;
-static GFont *splash_font, *splash_italic, *splash_mono;
-static int as,fh, linecnt;
@ctrlcctrlv
ctrlcctrlv / unique_representations.py
Created January 10, 2021 16:02
Just a bit of Twitter fun
D=dict();E=dict();[(E.__setitem__(float(v),u), (D.__setitem__(float(v), D.__getitem__(float(v))+1) if D.__contains__(float(v)) else D.__setitem__(float(v),1))) for (u, _, v) in [e.split()[:3] for e in list(filter(lambda s: re.match('^[0-9A-F]',s), dnv))] if len(u.split('..'))==1];(D.keys(),{k:(v,E[k],chr(int(E[k],16))) for (k,v) in D.items() if v==1})
@ctrlcctrlv
ctrlcctrlv / JimWatkinsArchives.md
Last active March 28, 2021 06:21
Jim Watkins archive magnet links directory(ジム・ワトキンスについてアーカイブのマグネットリンク集)

This is an updated list of my Jim Watkins archives.

In case you don't know what to do:

  • download qBittorrent for Windows, Mac, or GNU/Linux
    (no relation to Q the anon, Qt is a programming thing and the "q" comes from that)
  • open it
  • press "Open URL"
  • paste in any of, or all of, the magnet lines starting with magnet: below
  • be prepared to wait a while. please seed!
#!/usr/bin/env python3
# If you have a font that you've already added A-Z smallcaps to, and it has a bunch of precombined characters (e.g. İ, Ĵ, Ṡ, Ẅ), this script will select candidates for automatic building of precombined small caps via «Element→Style→Add Small Capitals…» in FontForge.
import fontforge
import unicodedata
import sys
import string
f = fontforge.activeFont()