https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
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
1 | const std = @import("std"); | |
2 | const rl = @import("raylib"); | |
3 | const cl = @import("zclay"); | |
4 | const renderer = @import("raylib_render_clay.zig"); | |
5 | const math = std.math; // Import math for ceil | |
6 | const fmt = std.fmt; // Import fmt for string formatting | |
7 | | |
8 | const light_grey: cl.Color = .{ 224, 215, 210, 255 }; | |
9 | const red: cl.Color = .{ 168, 66, 28, 255 }; | |
10 | const orange: cl.Color = .{ 225, 138, 50, 255 }; |
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
const JsonString = struct { | |
value: []const u8, | |
}; | |
const JsonNumber = struct { | |
value: f64, | |
}; | |
const JsonObject = struct { | |
const Property = struct { | |
name: []const u8, | |
value: JsonValue, |
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
param( | |
[string[]]$Arguments | |
) | |
$OriginalPWD=$PWD | |
# Define the path to the Sublime Text directory | |
$SublimePath = "C:\Program Files\Sublime Text" | |
# Define the path to the Sublime Text executable |
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
$utilsList = @(coreutils --list) | |
Foreach ($util in $utilsList) { | |
$util_path = ( -join (".\", $util, ".exe")) | |
New-Item -ItemType SymbolicLink -Path $util_path -Target "C:\Users\Mohan\AppData\Local\Microsoft\WinGet\Packages\uutils.coreutils_Microsoft.Winget.Source_8wekyb3d8bbwe\coreutils-0.0.30-x86_64-pc-windows-msvc\coreutils.exe" |
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
# -*- mode: justfile -*- | |
# ============================================================================== | |
# Settings - Control Just's behavior | |
# ============================================================================== | |
# Set the shell used to execute recipes. Array form is recommended. | |
# -u: Treat unset variables as an error. | |
# -c: Read commands from string. | |
set shell := ["bash", "-uc"] |
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
const std = @import("std"); | |
const json = std.json; | |
const Allocator = std.mem.Allocator; | |
const StringHashMap = std.StringHashMap; | |
const ArrayList = std.ArrayList; | |
// --- Data Structures Mirroring JSON Schema --- | |
// Corresponds to TypeScript's ParameterKind | |
pub const ParameterKind = enum { |
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
pub fn main() !void { | |
// const justfile = try std.fs.cwd().openFile("justfile.json", .{}); | |
// var buffer: [3000]u8 = undefined; | |
// const bytes_read = try justfile.readAll(&buffer); | |
// const content = buffer[0..bytes_read]; | |
// const stdout = std.io.getStdOut().writer(); | |
// var gpa: std.heap.GeneralPurposeAllocator(.{}) = .init; | |
// defer _ = gpa.deinit(); | |
// const allocator = gpa.allocator(); | |
// var parsed = try std.json.parseFromSlice(std.json.Value, allocator, content, .{ .allocate = .alloc_always }); |
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
const std = @import("std"); | |
// Import the zf library module we added in build.zig | |
const zf = @import("zf"); | |
// Helper function to recursively find all file paths relative to the start_dir | |
// It appends duplicated paths to the provided ArrayList. | |
fn getAllFilePathsRecursive( | |
allocator: std.mem.Allocator, | |
base_dir: std.fs.Dir, // The directory we are currently iterating in | |
current_rel_path: []const u8, // Path relative to the *initial* start directory (e.g., ".") |
Use the right tool for the job.
Astro Paper for weekly Microcontroller Workshop meetings.
Astro starlight for technical documentation guides.
mdbook for curated version of these gists tailored for: cli/tui/gui/android/embedded etc.
NewerOlder