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
.text | |
.intel_syntax noprefix | |
.file "test" | |
.globl _start | |
.type _start,@function | |
_start: | |
push ebp | |
push ebx | |
push edi | |
push esi |
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 builtin = @import("builtin"); | |
pub fn main() !void { | |
try dbg("{d}", 24); | |
} | |
fn dbg(comptime fmt: []const u8, x: anytype) !void { | |
comptime std.debug.assert(builtin.mode == .Debug); |
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"); | |
extern fn sigaltstack(ss: *const stack_t, oss: *stack_t) c_int; | |
const stack_t = extern struct { | |
sp: ?*anyopaque, | |
flags: c_int, | |
size: usize, | |
}; |
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
.head { | |
height: 32px; | |
font-size: 16px; | |
line-height: 32px | |
} | |
.head ul { | |
margin: 0 | |
} | |
.head ul li { | |
list-style-type: 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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"golang.org/x/crypto/ssh" | |
) | |
func main() { |
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
package main | |
import ( | |
"crypto" | |
"crypto/ed25519" | |
"encoding/base32" | |
"encoding/base64" | |
"encoding/hex" | |
"flag" | |
"fmt" |
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 c = @cImport({ | |
@cInclude("X11/Xlib.h"); | |
@cInclude("X11/Xutil.h"); | |
@cInclude("X11/keysymdef.h"); | |
@cInclude("GL/gl.h"); | |
@cInclude("GL/glx.h"); | |
}); |
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 extras = @import("extras"); | |
pub fn amInside() !bool { | |
return try extras.doesFileExist(null, "/.dockerenv"); | |
} |
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 string = []const u8; | |
const Progress = @This(); | |
const ansi = @import("ansi"); | |
const range = @import("range").range; | |
const extras = @import("extras"); | |
total: usize, | |
current: usize = 0, |
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
/* Safari and Edge polyfill for createImageBitmap | |
* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap | |
*/ | |
if (!('createImageBitmap' in window)) { | |
window.createImageBitmap = async function(blob) { | |
return new Promise((resolve,reject) => { | |
let img = document.createElement('img'); | |
img.addEventListener('load', function() { | |
resolve(this); | |
}); |