Skip to content

Instantly share code, notes, and snippets.

(* Compact *)
List.iter (add_event (fun x -> x.read <- true)) in_fds
(* Less-compact *)
let set_as_read x = x.read <- true in
List.iter (add_event set_as_read) in_fds
(* Least-compact *)
let set_as_read x = x.read <- true in
let add_setread_event_for_single_item item = add_event set_as_read item in
#!/bin/bash
APP=$1
# This script is intended to temporarily bypass the "blank screen" bug in Anki on unsupported(?)
# GPUs (Dec 2021): <https://forums.ankiweb.net/t/anki-opens-but-all-windows-are-blank/8920/16>
#
# Adapted from a similar script by @ahihi for an app called "SuperCollider" that also uses qt on
# macOS: <https://github.com/supercollider/supercollider/issues/4136#issuecomment-605447703>
if [ -z "$APP" ]; then
@ELLIOTTCABLE
ELLIOTTCABLE / gist:1046112
Created June 25, 2011 03:35
Warrior-tank macros
<!-- ‘Fast’ macros: If you spam these keys very fast, you can often queue up the spell via the
/castsequence after the stance-change has already registered with the server, meaning you get out-of and
back-into Defensive Stance ASAP (A Good Thing™). -->
#showtooltip Retaliation
/castsequence [stance:2/3] reset=2.5 Battle Stance, Retaliation, Retaliation; [stance:1] Retaliation
/cast [stance:1] Defensive Stance
#showtooltip Recklessness
/castsequence [stance:1/2] reset=2.5 Berserker Stance, Recklessness, Recklessness; [stance:3] Recklessness
/cast [stance:3] Defensive Stance
@ELLIOTTCABLE
ELLIOTTCABLE / 1. userChrome.css
Created August 20, 2021 21:43
My FireFox settings, just 4 u, genny
/* Hide horizontal tabs at the top of the window #1349, #1672, #2147 */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
opacity: 0;
pointer-events: none;
}
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
visibility: collapse !important;
}
#TabsToolbar .titlebar-spacer {
border-inline-end: none !important;
" #### Startify
augroup update-startify | augroup
function! s:restartify() abort
echom 'restartify'
call s:startify_dirmode()
Startify
endfunction
function! s:startify_dirmode() abort
$ msbuild FSharpMod.sln -restore -p:Configuration=Release
Microsoft (R) Build Engine version 16.6.0 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 8/14/2021 1:59:20 PM.
Project "/Users/ec/Sync/Code/FSharpMod/FSharpMod.sln" on node 1 (Restore target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
_GetAllRestoreProjectPathItems:
@ELLIOTTCABLE
ELLIOTTCABLE / pre-v1.3.yaml
Created July 7, 2021 01:36
Modlist working on 1.2
Version: 1
Name: pre-v1.3
Mods:
- Id: brrainz.harmony
Name: Harmony
- Id: ludeon.rimworld
Name: Core
- Id: ludeon.rimworld.royalty
Name: Royalty
- Id: unlimitedhugs.hugslib
Version: 1
Name: TEMP
Mods:
- Id: brrainz.harmony
Name: Harmony
- Id: ludeon.rimworld
Name: Core
- Id: ludeon.rimworld.royalty
Name: Royalty
- Id: fluffy.modmanager
@ELLIOTTCABLE
ELLIOTTCABLE / gist:1411167
Created November 30, 2011 21:56
List of irssi's default format values
[core] - [Core]
[Windows]
line_start = {line_start}
line_start_irssi = {line_start}{hilight Irssi:}
timestamp = {timestamp $Z}
servertag = [$0]
daychange = Day changed to %%d %%b %%Y
talking_with = You are now talking with {nick $0}
refnum_too_low = Window number must be greater than 1
@ELLIOTTCABLE
ELLIOTTCABLE / es2016-jxa.js
Created May 2, 2017 09:20
ECMAScript 2017 `async` in macOS Sierra JavaScriptCore
#!/usr/bin/env osascript -l JavaScript
// macOS Sierra uses a JavaScriptCore analagous to that in Safari 10.1. This supports all of
// ECMAScript 2015 (“ES6”), and even much of ECMAScript 2016! For instance, try `async` functions:
async function hello(){
return "Hello, world!"
}
function run(argv) {
var p = hello();