Skip to content

Instantly share code, notes, and snippets.

View wasi-sdk-windows.diff
diff --git a/Makefile b/Makefile
index 38f5cb1..38b92a6 100644
--- a/Makefile
+++ b/Makefile
@@ -59,8 +59,9 @@ build/llvm.BUILT:
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DLLVM_CCACHE_BUILD=ON \
- -DLLVM_CCACHE_DIR=ccache \
View gitlab.js
setInterval(() => document.querySelector(".js-scroll-bottom").click(),1000)
View notion-rewrite.ts
#!/usr/bin/env -S deno run --allow-read --allow-write
import * as flags from "https://deno.land/std@0.160.0/flags/mod.ts";
import * as fs from "https://deno.land/std@0.160.0/fs/mod.ts";
function hash_decomp(p: string) {
const i = p.search(/ [a-f0-9]{32}/);
if (i === -1) {
return [p, null];
}
View ar-extract.hs
{-# LANGUAGE RecordWildCards #-}
import qualified Data.ByteString as BS
import Data.Foldable
import Data.Functor
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as S
import GHC.SysTools.Ar
import System.Environment.Blank
View godbolt.hs
{-# LANGUAGE Strict #-}
import GHC.Plugins hiding ((<>))
import GHC.CmmToC
import GHC (defaultErrorHandler, runGhc, setSessionDynFlags, getSessionDynFlags)
import GHC.Cmm
import GHC.Types.Unique
import Data.List
import System.Process
import Control.Exception
View Encoding.s
# libraries/base/GHC/IO/Encoding.hs
################################
################################
# section ""cstring" . base_GHCziIOziEncoding_mkTextEncoding8_bytes" {
# base_GHCziIOziEncoding_mkTextEncoding8_bytes:
# I8[] "//IGNORE"
# }
################################
# section ""cstring" . base_GHCziIOziEncoding_mkTextEncoding6_bytes" {
View AutoApply.cmm
// DO NOT EDIT!
// Automatically generated by utils/genapply/Main.hs
#include "Cmm.h"
#include "AutoApply.h"
import CLOSURE __stderr_FILE;
stg_ap_p_fast() { // [R1, R2]
I32 _us, _c2, _cg, _ci, _unused;
View ghc-ipe.sh
#!/usr/bin/env bash
set -euxo pipefail
export PATH=~/.cabal/bin:~/.ghcup/bin:$PATH
apt update
apt full-upgrade -y
apt install -y \
automake \
View preproc.hs
{-# LANGUAGE OverloadedStrings #-}
import Data.List
import qualified Data.Map.Strict as M
import qualified Data.Text as T
main :: IO ()
main = do
s <- readFile "rts/include/stg/MiscClosures.h"
let toks =
View sb.sh
readonly NIX_BUILD_GROUP_ID=30000
readonly NIX_BUILD_GROUP_NAME=nixbld
readonly NIX_FIRST_BUILD_UID=30001
readonly NIX_USER_COUNT=48
sudo groupadd \
-g "$NIX_BUILD_GROUP_ID" \
--system \
"$NIX_BUILD_GROUP_NAME"