Skip to content

Instantly share code, notes, and snippets.

View lawrence-laz's full-sized avatar
👋
Hi there!

Laurynas Lazauskas lawrence-laz

👋
Hi there!
  • Lithuania, Vilnius
View GitHub Profile
@permutationlock
permutationlock / build.zig
Last active March 31, 2024 22:19
Run gdb on test step using build.zig
const std = @import("std");
const builtin = @import("builtin");
const Builder = std.build.Builder;
pub fn build(b: *Builder) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const main_tests = b.addTest(.{
.root_source_file = .{ .path = "main.zig" },
@xkr47
xkr47 / libera.irssi
Last active September 28, 2023 09:39
How to add the libera.chat network to irssi
Replace all <....> parts with your specific details
/network add -nick <nick> libera
/server add -network libera -auto -ssl irc.libera.chat 6697
/connect libera
/query NickServ
register <password> <email>
<copypaste line from email>
/network add -autosendcmd "" -sasl_username <user> -sasl_password <pass> -sasl_mechanism PLAIN libera
/channel add -auto <channel> libera
@kprotty
kprotty / ParkingLot.zig
Last active June 30, 2024 13:42
Small & Fast synchronization primitives for Zig
pub fn ParkingLot(comptime Config: type) type {
return struct {
pub const Lock: type = Config.Lock;
pub const Event: type = Config.Event;
pub const nanotime: fn() u64 = switch (@hasDecl(Config, "nanotime")) {
true => Config.nanotime,
@sebmarkbage
sebmarkbage / Infrastructure.js
Last active June 2, 2024 08:51
SynchronousAsync.js
let cache = new Map();
let pending = new Map();
function fetchTextSync(url) {
if (cache.has(url)) {
return cache.get(url);
}
if (pending.has(url)) {
throw pending.get(url);
}
@bzgeb
bzgeb / PlayerPrefsSerializer.cs
Created September 27, 2013 19:27
Player Prefs Serializer
/**
* @file PlayerPrefsSerializer.cs
* @brief Code snippet from UnityForum (http://forum.unity3d.com/threads/72156-C-Serialization-PlayerPrefs-mystery)
* @author mindlube+FizixMan
* @version 1.0
* @date 2012-06-15
*/
using UnityEngine;
using System;
@banaslee
banaslee / XGH - en.txt
Last active June 18, 2024 06:53
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).