https://github.com/nektro/zigmod
https://github.com/nektro/ziglint
https://git.sr.ht/~nektro/magnolia-desktop
https://git.sr.ht/~nektro/wifilylinux
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 bash | |
| download-zig() { | |
| arch=$(uname -m) | |
| os=$(uname -s | tr '[:upper:]' '[:lower:]') | |
| double="$arch-$os" | |
| if [ -z "$1" ] | |
| then | |
| echo missing version argument |
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"); | |
| pub fn Unit(kg_: i32, m_: i32, s_: i32, A_: i32, K_: i32, mol_: i32, cd_: i32) type { | |
| return struct { | |
| const This = @This(); | |
| const kg: i32 = kg_; | |
| const m: i32 = m_; | |
| const s: i32 = s_; | |
| const A: i32 = A_; | |
| const K: i32 = K_; |
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
| git-deleteallotherbranches() { | |
| git branch | grep -v $(git branch --show-current) | xargs -L1 git branch -D | |
| } |
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 Archive = struct { | |
| magic: [4]u8 = [_]u8{ 'q', 'o', 'z', 1 }, | |
| files_count: u32, | |
| files: [*]File, | |
| }; | |
| const File = struct { | |
| flags: Flags, | |
| data_length: u64, |
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 sites = { | |
| "foo.localhost": 8001, | |
| "bar.localhost": 8003, | |
| "qux.localhost": 8004, | |
| "sam.localhost": 8005, | |
| }; | |
| // new version based on: | |
| // https://stackoverflow.com/questions/20351637/how-to-create-a-simple-http-proxy-in-node-js |
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 const ErrorCode = enum(u16) { | |
| /// The operation completed successfully. | |
| ERROR_SUCCESS = 0x00000000, | |
| /// Incorrect function. | |
| ERROR_INVALID_FUNCTION = 0x00000001, | |
| /// The system cannot find the file specified. | |
| ERROR_FILE_NOT_FOUND = 0x00000002, |
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"); | |
| pub fn build(b: *std.Build) void { | |
| const target = b.standardTargetOptions(.{}); | |
| const optimize = b.standardOptimizeOption(.{}); | |
| const exe = b.addExecutable(.{ | |
| .name = "test", | |
| .root_source_file = .{ .path = "main.zig" }, | |
| .target = target, |
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
| diff --git a/CMakeLists.txt b/CMakeLists.txt | |
| index 925fd2d63..ff5005494 100644 | |
| --- a/CMakeLists.txt | |
| +++ b/CMakeLists.txt | |
| @@ -655,13 +655,13 @@ include_directories( | |
| ) | |
| if(MSVC) | |
| - set(EXE_CXX_FLAGS "/std:c++14") | |
| + set(EXE_CXX_FLAGS "/std:c++17") |
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
| .text | |
| .intel_syntax noprefix | |
| .file "test" | |
| .globl _start | |
| .type _start,@function | |
| _start: | |
| push ebp | |
| push ebx | |
| push edi | |
| push esi |
NewerOlder