Skip to content

Instantly share code, notes, and snippets.

View emidoots's full-sized avatar
😸
Herding cats

Emi emidoots

😸
Herding cats
View GitHub Profile
const std = @import("std");
const Allocator = std.mem.Allocator;
pub const Error = error{
EndOfStream,
Utf8InvalidStartByte,
} || std.fs.File.ReadError || std.fs.File.SeekError || std.mem.Allocator.Error;
pub fn Parser(comptime Value: type, comptime Reader: type) type {
return struct {
@emidoots
emidoots / ramblings.md
Last active December 25, 2024 04:39
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

"facebook/create-react-app",
"reduxjs/redux",
"GoogleChrome/puppeteer",
"trekhleb/javascript-algorithms",
"30-seconds/30-seconds-of-code",
"zeit/next.js",
"yarnpkg/yarn",
"storybooks/storybook",
"thedaviddias/Front-End-Checklist",
"NARKOZ/hacker-scripts",
@emidoots
emidoots / regex.go
Created January 23, 2020 05:46
Go | Golang | Regex replace all byte submatches | regexp.ReplaceAllSubmatchFunc |
// replaceAllSubmatchFunc is the missing regexp.ReplaceAllSubmatchFunc; to use it:
//
// pattern := regexp.MustCompile(...)
// data = replaceAllSubmatchFunc(pattern, data, func(groups [][]byte) [][]byte {
// // mutate groups here
// return groups
// })
//
// This snippet is MIT licensed. Please cite by leaving this comment in place. Find
// the latest version at:
sourcegraph %
💡 Running 5 checks...
✅ Check "docker" success!
✅ Check "redis" success!
✅ Check "postgres" success!
✅ Check "git" success!
ℹ️ We found some changes in dev-private that you're missing out on! If you want the new changes, 'cd ../dev-private' and then do a 'git stash' and a 'git pull'!
✅ Check "dev-private" success!

Mar 11: In Effort to Bolster Government Cybersecurity, Biden Administration Takes Step to Ensure Secure Dev

Today’s release of the secure software development attestation form reinforces secure-by-design principles advanced by CISA, Federal government partners, and international allies:

The referenced secure-by-design principles published by CISA

Note: the above includes 9 references to memory safe, which it regards as:

sourcegraph % bazel test //cmd/frontend/internal/context/...
INFO: Analyzed 3 targets (0 packages loaded, 0 targets configured).
ERROR: /Users/stephen@sourcegraph.com/work/sourcegraph/cmd/frontend/internal/context/resolvers/BUILD.bazel:21:8: GoCompilePkg cmd/frontend/internal/context/resolvers/resolvers_test.internal.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target //cmd/frontend/internal/context/resolvers:resolvers_test) bazel-out/darwin_arm64-opt-exec-ST-13d3ddad9198/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix darwin_arm64_race -tags race -src ... (remaining 73 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cmd/frontend/internal/context/resolvers/context_test.go:105:6: no new variables on left side of :=
compilepkg: error running subcommand GOROOT_FINAL=GOROOT \
GOEXPERIMENT=nocoverageredesign \
GOOS=darwin \
ZERO_AR_DATE=1 \
@emidoots
emidoots / deps.md
Created December 4, 2023 23:22
shuttle.rs dependencies
PS C:\dev\shuttle-projects\shuttle> cargo tree
    Updating crates.io index
    Updating git repository `https://github.com/shuttle-hq/tokiotest-httpserver`
    Updating git repository `https://github.com/chesedo/hyper-reverse-proxy`
  Downloaded outref v0.5.1
  Downloaded predicates-tree v1.0.9
  Downloaded dirs-sys v0.3.7
  Downloaded crc-catalog v2.4.0
  Downloaded diff v0.1.13
const std = @import("std");
const Allocator = std.mem.Allocator;
const Parser = @import("parser.zig").Parser;
const Error = @import("parser.zig").Error;
pub fn Literal(comptime Reader: type) type {
return struct {
parser: Parser([]u8, Reader) = .{
._parse = parse,
},
RG353P:/data/anr # cat anr_2023-09-06-16-33-55-478
----- pid 6743 at 2023-09-06 16:33:55 -----
Cmd line: net.random_projects.zig_android_template
Build fingerprint: 'RG353P/RG353P/RG353P:11/RD2A.211001.002/eng.dell.20230306.183900:userdebug/release-keys'
ABI: 'arm64'
Build type: optimized
Zygote loaded classes=15739 post zygote classes=43
Dumping registered class loaders
#0 dalvik.system.PathClassLoader: [], parent #1