page version: May 2, 2023
-
aruba access points are AWESOME
ebay, $6.50/instant AP 215 (incl. shipping).
-
archiving stack overflow (for the forest)
First Iteration
-
fountain pen nibs
Several weeks ago, I lost my other TWSBI 580 (technically, the 580 ALR) which meant that I didn’t have any EF nibs left1.
-
TWSBI F nibs are more like a M, so you need a EF if you want a F. ↩
-
-
deoplete
Instead of doing work, I spent the better half of a day fixing my deoplete config, and added these deoplete sources1 on top of the ones that ship with deoplete– which are fabulous and could well be all you need.
-
deoplete has a notion of source, which is what generates autocompletion candidates in the pum (pop up menu, as in ‘pumvisible’). Sources are python3 scripts that can contribute candidates asyncly. I haven’t stared much at how to write a source, but the system looks well designed at a glance. ↩
-
-
vim
Instead of doing work, I got to thinking that since I spend so much time in vim, I should really build and configure vim from source, instead of just using the debian packaged vim-gtk3.
-
noctua fans
I finally replaced the cpu and case fan on the T130 with noctua fans because I couldn’t bear the racket anymore– I can’t remember if the stock fans just wouldn’t spin slower or were just loud– and I have to say I’m an instant fan– no pun intended. The box is finally quiet. It only took ~6 years. Speaking of which, those stock fans were… dirty.
-
Natural Models
We were talking about natural models today, in the sense of Awodey. And I still have yet to read most of the paper, but I’d always thought that that paper must’ve been about, well, natural models. But as far as I can tell, the paper is not about models of homotopy type theory in a model of homotopy type theory.
-
Mellanox ConnectX-4 10gbe
A short post for now:
-
Thunderbird and Nix
This is the second time I’ve come across this issue, and since it seems I’d forgotten about it after the first time, I’m making a note here.
-
xmonad
As with the icecc post, I’m moving xmonad from one server to another for “less downtime”1.
-
I’m reproducing the xmonad setup on the Dell T130 (Pentium G4600) to a container on the Lenovo P720 (dual Xeon 6142s), so I can restart other stuff w/o killing my window manager ↩
-
-
icecc
It’s break and I’m cleaning up some computer stuff.
-
ble.sh
I just installed ble.sh and wow is this nice.
-
Live Reload
I’ve been writing posts without live reloading/preview for some reason. I think
--watch
didn’t work or something. -
coordinating processes
This has to be a solved problem?!
-
tortoise text to speech (and piper)
Motivation
-
nic bonding
- nmtui
- edit a connection
- add
- type bond
- two slaves
- idk why but it seems like you need to create two entirely new connections
- so deactivate the old connections before activating the bond
- set primary device (eg
eno2
). This is the mac address used? - status:
nmcli con
ip address
- the mac address changes (not sure why), so you probably have to change the dhcp server settings to statically lease the old ip to the bond mac address
-
book catalogue
-
equivalence of categories
An oft-stated characterization of an equivalence of categories is that TFAE:
- A functor \(F : \mathcal{C} → \mathcal{D}\) is (the forward direction of) an equivalence of categories
- \(F\) is full, faithful, and essentially surjective on objects1
-
the definitions are standard, but the way I remember it is that faithful := injective on homsets, full := surjective on homsets, eso := surjective on objects, up to isomorphism ↩
-
moving from git to darcs
I played around with
darcs
two summers ago, but in this day and age everyone usesgit
so it’s just not practical when working with other people. -
multiple displays and linux graphics modules
So I got a HP z2 mini g3 recently (to replace an existing dual monitor setup, which is relevant. The optiplex 780 usff and its core 2 duo E8400 is a real workhorse.), which has an intel xeon e3-1225 v6 (which could actually replace the pentium G4600 in my T130…1) and a mobile nvidia quadro m620.
-
especially while the disposition center has the z2 mini g3 ‘s for less than what you typically find just the e3-1225 v6 for… ↩
-
-
shelving studying nonstandard analysis
(personal record keeping)
-
chili oil
since I always manage to forget something so simple:
- take the thai chili or equivalent
- remove stem, and remove tip as it’s prone to burning
- the seeds burn slower than the flesh, so
- cut in half lengthwise
- remove the seeds and put them in a spoon
- cut the flesh into quarters or some sort of strip
- if the pieces are too small, they tend to burn
- if the pieces are too large, it’s a waste of pepper
- heat neutral oil in the smallest saucepan
- seeds in first, dump the spoon
- wait a bit, then fresh in
- high heat quickly, then immediately off to prevent burning
-
some remarks apropos scripting
-
rasterizing pdfs, among other things
-
funny sayings
To keep track of funny sayings I’ve come across:
-
my gsi application videos
-
this jekyll site's _plugins
this page is generated by the plugin source below:
no_date.rb
# https://stackoverflow.com/a/68287682 class Jekyll::PostReader # monkey patch `Jekyll::PostReader::read_posts` so we don't have to write the # date in the post filename # # see the jekyll source def read_posts(dir) read_publishable(dir, "_posts", Jekyll::Document::DATELESS_FILENAME_MATCHER) end end
include_absolute.rb
module Jekyll module Tags class IncludeAbsoluteTagError < StandardError attr_accessor :path def initialize(msg, path) super(msg) @path = path end end class IncludeAbsoluteTag < Liquid::Tag VALID_SYNTAX = %r! ([\w-]+)\s*=\s* (?:"([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)'|([\w\.-]+)) !x VARIABLE_SYNTAX = %r! (?<variable>[^{]*(\{\{\s*[\w\-\.]+\s*(\|.*)?\}\}[^\s{}]*)+) (?<params>.*) !mx FULL_VALID_SYNTAX = %r!\A\s*(?:#{VALID_SYNTAX}(?=\s|\z)\s*)*\z! VALID_FILENAME_CHARS = %r!^[\w/\.-]+$! def initialize(tag_name, markup, tokens) super matched = markup.strip.match(VARIABLE_SYNTAX) if matched @file = matched["variable"].strip @params = matched["params"].strip else @file, @params = markup.strip.split(%r!\s+!, 2) end validate_params if @params @tag_name = tag_name end def syntax_example "{% #{@tag_name} 'file.ext' param='value' param2='value' %}" end def parse_params(context) params = {} markup = @params while (match = VALID_SYNTAX.match(markup)) markup = markup[match.end(0)..-1] value = if match[2] match[2].gsub(%r!\\"!, '"') elsif match[3] match[3].gsub(%r!\\'!, "'") elsif match[4] context[match[4]] end params[match[1]] = value end params end def validate_file_name(file) if file !~ VALID_FILENAME_CHARS raise ArgumentError, <<-MSG Invalid syntax for include tag. File contains invalid characters or sequences: #{file} Valid syntax: #{syntax_example} MSG end end def validate_params unless @params =~ FULL_VALID_SYNTAX raise ArgumentError, <<-MSG Invalid syntax for include tag: #{@params} Valid syntax: #{syntax_example} MSG end end # Grab file read opts in the context def file_read_opts(context) context.registers[:site].file_read_opts end # Render the variable if required def render_variable(context) if @file =~ VARIABLE_SYNTAX partial = context.registers[:site] .liquid_renderer .file("(variable)") .parse(@file) partial.render!(context) end end def render(context) site = context.registers[:site] file = render_variable(context) || @file # strip leading and trailing quote's file = file.gsub!(/\A'|'\Z/, '') validate_file_name(file) source = File.expand_path(context.registers[:site].config['source']).freeze path = File.join(source, file) return unless path partial = Liquid::Template.parse(read_file(path, context)) context.stack do context["include"] = parse_params(context) if @params begin partial.render!(context) rescue Liquid::Error => e e.template_name = path e.markup_context = "included " if e.markup_context.nil? raise e end end end def valid_include_file?(path, dir, safe) !outside_site_source?(path, dir, safe) && File.file?(path) end def outside_site_source?(path, dir, safe) safe && !realpath_prefixed_with?(path, dir) end def realpath_prefixed_with?(path, dir) File.exist?(path) && File.realpath(path).start_with?(dir) rescue StandardError false end # This method allows to modify the file content by inheriting from the class. def read_file(file, context) File.read(file, **file_read_opts(context)) end private def could_not_locate_message(file, includes_dirs, safe) message = "Could not locate the included file '#{file}' in any of "\ "#{includes_dirs}. Ensure it exists in one of those directories and" message + if safe " is not a symlink as those are not allowed in safe mode." else ", if it is a symlink, does not point outside your site source." end end end end end Liquid::Template.register_tag("include_absolute", Jekyll::Tags::IncludeAbsoluteTag)
hook-jekyll-version.rb
# variables I want in my posts # (I wish I could write the ruby directly in the page sources.) Jekyll::Hooks.register :site, :after_init do |site| site.config['ruby-version'] = RUBY_DESCRIPTION site.config['jekyll-version'] = Gem.loaded_specs['jekyll'].version.version end
hook-_plugins.rb
# automatically build the content about this site's _plugins Jekyll::Hooks.register :site, :after_init do |site| acc = [] Dir.each_child("_plugins"){ |filename| acc.push("## #{filename}\n#{(File.readlines(File.join("_plugins", filename)).map {|line| " #{line}"}).join()}\n") } site.config['about-_plugins'] = "this page is generated by the plugin source below:\n#{acc.join()}" end
-
Welcome to Jekyll!
You’ll find this post in your
_posts
directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to runjekyll serve
, which launches a web server and auto-regenerates your site when a file is updated. -
sorting the page links in the top right header
edit: should’ve read the minima README more carefully…
-
getting page last modified time
I spent way too much time mucking around with a stack overflow post and the minima source to get page modification times.
-
latex with katex
I looked up something like “jekyll latex” and found some helpful resources: