gh
with a logged in usergit clone
zig repo inzig
jq
,date
, andgit
inPATH
.
This file contains 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
import string | |
import random | |
vowels = "aoeuiy" | |
def m(): | |
c1 = vowels[random.randint(0,len(vowels)-1)] | |
c2 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)] | |
c3 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)] | |
print('z' + c1 + c2 + c3) | |
m() |
This file contains 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
# Create a folder under the drive root | |
mkdir actions-runner; cd actions-runner | |
# Download the latest runner package | |
Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.311.0/actions-runner-win-arm64-2.311.0.zip -OutFile actions-runner-win-arm64-2.311.0.zip | |
# Optional: Validate the hash |
This file contains 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 assert = std.debug.assert; | |
const expect = std.testing.expect; | |
pub fn main() !void { | |
const big = try std.heap.page_allocator.alloc(u8, 2 * 1024 * 1024 * 1024); | |
_ = big; | |
var child = std.ChildProcess.init(&.{"/usr/bin/env"}, std.heap.page_allocator); | |
child.stdin_behavior = .Ignore; |
This file contains 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
// | |
// Author: Jonathan Blow | |
// Version: 1 | |
// Date: 31 August, 2018 | |
// | |
// This code is released under the MIT license, which you can find at | |
// | |
// https://opensource.org/licenses/MIT | |
// | |
// |
This file contains 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
Here's a bunch of stuff I found in referrer URL to ziglang.org. | |
I'm not stating any opinions on any of this content, just exposing the information. | |
--- | |
http://chriswarbo.net/blog/2017-03-03-free_elves.html | |
> Note that while Haskell doesn't have a "compile-time phase" (unlike, say, Zig), we can use Template Haskell to mess around with the syntax tree during compilation, which seems to be enough for our purposes. | |
> if I were really going to implement such a thing, I'd maybe target something more low-level (e.g. without garbage collection, RTS, etc.) so that I could tease out as much performance as possible. Languages like Zig, Terra, Nim or Rust. | |
This file contains 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 c = @cImport(@cInclude("soundio/soundio.h")); | |
const std = @import("std"); | |
const io = std.io; | |
const cstr = std.cstr; | |
const panic = std.debug.panic; | |
const math = std.math; | |
fn sio_err(err: c_int) !void { | |
switch (@intToEnum(c.SoundIoError, err)) { | |
c.SoundIoError.None => {}, |
This file contains 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 { | |
// Standard target options allows the person running `zig build` to choose | |
// what target to build for. Here we do not override the defaults, which | |
// means any target is allowed, and the default is native. Other options | |
// for restricting supported target set are available. | |
const target = b.standardTargetOptions(.{}); | |
// Standard optimization options allow the person running `zig build` to select |
This file contains 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 net = std.net; | |
const fs = std.fs; | |
const os = std.os; | |
pub const io_mode = .evented; | |
pub fn main() anyerror!void { | |
var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; | |
const allocator = &general_purpose_allocator.allocator; |
This file contains 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 add(a: i32, b: i32) i32 { | |
return a + b; | |
} |
NewerOlder