Skip to content

Instantly share code, notes, and snippets.

@amonshiz
amonshiz / builds-791-demo.md
Created April 28, 2026 20:07
BUILDS-791: macros job-determination ordering fix — before/after demo

BUILDS-791: Macros job-determination ordering fix

2026-04-28T20:07:22Z by Showboat 0.6.1

Macro source/test code lives under Macros/DuolingoMacros/Sources/ and Macros/DuolingoMacros/Tests/. Before this PR, the substring check on "Sources" in filename or "Tests" in filename ran before the Macros/ prefix branch in .github/actions/job-determination/job_selection.py, so changes inside macro code matched first and were continue'd — the macros job was never triggered.

Both runs below feed the same input — a single changed file at Macros/DuolingoMacros/Sources/ArchGeneratorMacros/Generators/SomeGenerator.swift — first against HEAD~1 (pre-fix) and then against HEAD (this PR).

Setup: write the simulated changed-files list

───────┬────────────────────────────────────────────────────────────────────────
│ File: gsl.fish
───────┼────────────────────────────────────────────────────────────────────────
1 │ function gsl
2 │ git sl | less -R
3 │ end
───────┴────────────────────────────────────────────────────────────────────────
───────┬────────────────────────────────────────────────────────────────────────
│ File: gm.fish
───────┼────────────────────────────────────────────────────────────────────────
@amonshiz
amonshiz / buck-audit-ruletype-help-text-infinite-recursion.txt
Last active December 20, 2019 03:50
buck audit ruletype help text infinite recursion
$ buck audit ruletype -h
[2019-12-19 22:43:13.854][error][command:null][tid:01][com.facebook.buck.log.memory.MemoryHandler] Infinite recursion (StackOverflowError) (through reference chain: org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.u
let setTimeout = function(callback, duration) {
callback();
};
let req = new Request("https://cdnjs.cloudflare.com/ajax/libs/jsmediatags/3.9.0/jsmediatags.js");
let content = await req.loadString();
eval(content);
var fileURLs
if (args.fileURLs.length > 0) {
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to create App Support directory /Users/<USER>/Library/Application Support/BetterTouchTool : Error Domain=NSCocoaErrorDomain Code=516 "The file “BetterTouchTool” couldn’t be saved in the folder “Application Support” because a file with the same name already exists." UserInfo={NSFilePath=/Users/<USER>/Library/Application Support/BetterTouchTool, NSUnderlyingError=0x61800025d6a0 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}'
terminating with uncaught exception of type NSException
abort() called
Process: BetterTouchTool [79715]
Path: /Applications/BetterTouchTool.app/Contents/MacOS/BetterTouchTool
Identifier: com.hegenberg.BetterTouchTool
Version: 2.071 (608)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: BetterTouchTool [79715]
User ID: 2062845401
Date/Time: 2017-04-27 09:46:26.824 -0400
@amonshiz
amonshiz / String+Localization.swift
Created November 21, 2016 13:17
String extension to simplify localization
extension String {
var localized: String {
get {
return NSLocalizedString(self, comment: "")
}
}
}
permutationWithMod :: Integer -> Integer -> Integer -> Integer
permutationWithMod numTake setSize modValue =
let nums = [(setSize - numTake + 1)..setSize]
in foldl (\acc n -> (acc * n) `mod` modValue) 1 nums
main :: IO()
main = do
setSize <- getLine
numTake <- getLine
modValue <- getLine
@amonshiz
amonshiz / LocatingRestrictionSites2.hs
Created August 16, 2015 21:38
Project Rosalind - Locating Restriction Sites 2
import Bioinformatics.DNANucleotide (DNANucleotide (..),
charToDNANucleotide)
import Bioinformatics.Utilities (getLines, reverseComplement)
import Data.List (sort)
type PotentialSite = (Int, Int)
slice :: PotentialSite -> [a] -> [a]
slice (b, l) xs = take l $ drop b xs
@amonshiz
amonshiz / Bioinformatics.Utilities.hs
Created August 16, 2015 21:34
Project Rosalind - Locating RestrictionSites
module Bioinformatics.Utilities (
getLines,
dnaToRNA,
reverseComplement
) where
import qualified Bioinformatics.DNANucleotide as D
import qualified Bioinformatics.RNANucleotide as R
getLines :: String -> IO String