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
// How to use | |
// - Place in tf\scripts\vscripts\mapspawn.nut | |
// References | |
// - https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en#See_Also | |
// - https://wiki.alliedmods.net/Team_Fortress_2_Events#player_changeclass | |
function Precache() { | |
PrecacheModel("models/props_2fort/coffeepot.mdl"); | |
PrecacheModel("models/player/pyro.mdl") |
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
// | |
// Based on C/C++ code from here: https://gist.github.com/benob/92ee64d9ffcaa5d3be95edbf4ded55f2 | |
// | |
const std = @import("std"); | |
const stb_truetype = @import("stb_truetype"); | |
const SDL = @import("sdl2"); | |
const Renderer = @import("renderer.zig").Renderer; | |
const Allocator = std.mem.Allocator; | |
var globalFormat: [*c]SDL.SDL_PixelFormat = null; |
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
module github.com/silbinarywolf/grpc-repro | |
go 1.17 | |
require ( | |
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a | |
google.golang.org/grpc v1.39.0 | |
) |
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
// +build windows | |
package steamworks | |
import ( | |
"log" | |
"syscall" | |
"unsafe" | |
) |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"syscall" | |
"unsafe" | |
) | |
var ( |
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
/// @function hmac_md5_test | |
/// @description Runs tests to ensure the correctness of hmac_md5 | |
var reportString = "hmac_md5_test() Test Report:\n\n" | |
var testCount = 0 | |
var passCount = 0 | |
var failCount = 0 | |
#region Test "A" string with "secret_key" as key | |
var test_name = "\"A\" string with \"secret_key\" as key" |
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
/// @function hmac_md5 | |
/// @param {buffer} buffer The buffer to get a hash of | |
/// @param {number} offset | |
/// @param {number} size | |
/// @param {string} key Shared secret key used for generating the HMAC variant of the message digest. | |
/// @description Create a hash-based message authentication code using a provided key | |
/// @source https://en.wikipedia.org/wiki/HMAC | |
var buffer = argument0 | |
var buffer_offset = argument1 |
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
package main | |
import ( | |
hmaclib "crypto/hmac" | |
"crypto/md5" | |
"encoding/hex" | |
"fmt" | |
"hash" | |
) |