This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Sublime Text Native (SublimeTextNative.dylib) | |
| // | |
| // Replaces Sublime Text's own window chrome with native AppKit UI: | |
| // * one NSWindow per document tab, grouped as native window tabs (NSWindowTabGroup); | |
| // * Sublime's real editor view (PXView) hosted in whichever tab window is selected; | |
| // * a full-height project sidebar and a unified toolbar (document proxy, project subtitle, | |
| // syntax picker); | |
| // * tab moves between windows (Window menu and drag), full screen, Sublime's menus, and | |
| // session/window-position fidelity. | |
| // Tested on Sublime Text 4215, arm64 macOS, only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://gist.github.com/saagarjha/ed701e3369639410b5d5303612964557 | |
| #import "swizzler.h" | |
| #import <AppKit/AppKit.h> | |
| #import <objc/runtime.h> | |
| static Swizzler<void, NSWindow *> BrowserWindow_updateCGSWindowTitle { | |
| NSClassFromString(@"BrowserWindow"), @selector(updateCGSWindowTitle), [](auto self) { | |
| BrowserWindow_updateCGSWindowTitle(self); | |
| auto auxiliaryStorage = object_getIvar(self, class_getInstanceVariable(self.class, "_auxiliaryStorage")); | |
| auto wmWindow = object_getIvar(auxiliaryStorage, class_getInstanceVariable([auxiliaryStorage class], "_wmWindow")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Install Binary Ninja from license.dat alone. Pure stdlib + `openssl` CLI. | |
| bn_install.py LICENSE TARGET [--channel dev|release|test] | |
| [--platform linux-arm|linux|macosx|win64] | |
| Each layer is the same primitive — IV(16) || AES-128-CBC(zlib(payload)) — and | |
| hands you the AES key for the next. /manifest and /channel additionally have a | |
| 256-byte RSA-PSS signature prefix. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Fetch a minimal CUDA headers tree for clangd, from NVIDIA's apt repo. | |
| Stdlib-only. Works anywhere with Python 3.9+. | |
| """ | |
| from __future__ import annotations | |
| import argparse | |
| import gzip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import datetime | |
| import html | |
| import html.parser | |
| import http.server | |
| import json | |
| import sys | |
| import urllib.request | |
| import urllib.parse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "internal" => 0 | |
| "name" => "a14" | |
| "system" => { | |
| "cpu" => { | |
| "aliases" => { | |
| "Cycles" => "FIXED_CYCLES" | |
| "Instructions" => "FIXED_INSTRUCTIONS" | |
| } | |
| "architecture" => "arm64" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Sometimes you have a large file on a small disk and would like to "transform" | |
| // it in some way: for example, by decompressing it. However, you might not have | |
| // enough space on disk to keep both the the compressed file and the | |
| // decompressed results. If the process can be done in a streaming fashion, it | |
| // would be nice if the file could be "drained"; that is, the file would be | |
| // sequentially deleted as it is consumed. At the start you'd have 100% of the | |
| // original file, somewhere in the middle you'd have about half of the original | |
| // file and half of your output, and by the end the original file will be gone | |
| // and you'll be left with just the results. If you do it this way, you might | |
| // be able to do the entire operation without extra space! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // As seen on: | |
| // https://federated.saagarjha.com/notice/AaEMQpJBSbxhLyxYzg | |
| // https://twitter.com/_saagarjha/status/1707423903969341949 | |
| // Compiling: gcc mmap_vs_read.c -O3 -o mmap_vs_read | |
| // Usage: ./mmap_vs_read <bigfile> <mmap|read> | |
| #include <fcntl.h> | |
| #include <stddef.h> | |
| #include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // LinkPresentation | |
| // Copyright © 2015-2020 Apple Inc. All rights reserved. | |
| // | |
| // FIXME: Twitter equivalents? | |
| (function () { | |
| var MetadataExtractor = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| var database; | |
| async function foo() { | |
| let key = await window.crypto.subtle.generateKey( | |
| { | |
| name: "HMAC", |
NewerOlder