Skip to content

Instantly share code, notes, and snippets.

View deckarep's full-sized avatar
🎯
Focusing

Ralph Caraveo deckarep

🎯
Focusing
View GitHub Profile
@joshuat
joshuat / Slack avatar-less sidebar.md
Last active January 19, 2021 08:25
Remove the avatars from your slack sidebar

Slack has listened to feedback and given us a way to toggle off the sidebar avatars.

(This only seems to be available in the Beta channel at the moment)

Display or hide profile photos

  1. From your desktop, click your profile picture in the top right.
  2. Select Preferences from the menu.
  3. Click Sidebar in the left-side column.
  4. Check or uncheck the boxes next to Show profile photos next to DMs.
%{
#include <stdio.h>
#include "parser.h"
%}
%%
[ \r\n\t]* { continue; /* Skip blanks. */ }
[0-9]+ { sscanf(yytext, "%d", &yylval->value);
return TOKEN_NUMBER; }
@andrewrk
andrewrk / benchmark_stuff.txt
Created May 13, 2020 18:21
RedisConf2020 Talk: "Writing Redis Modules in Zig" https://www.youtube.com/watch?v=Csz26Wy9Ses
test "benchmark" {
var timer = try std.time.Timer.start();
const start = timer.lap();
var i: usize = 0;
var hash: usize = 0;
while (i < 1000000) : (i += 1) {
const src = "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.";
var output: [100]u8 = undefined;
var bf: BrainFuckInterpreter = undefined;
bf.init(src, "", &output, 500);
package main
import (
"flag"
"image"
"image/color"
"time"
"github.com/peterhellberg/gfx"
)
@deebs67
deebs67 / ARMlite.md
Last active January 17, 2026 21:26
ARMlite simulator

ARMlite simulator

The ARMlite simulator is a web-based simulator of a 32-bit 'ARM-like' processor and Instruction Set Architecture (ISA), developed by Peter Higginson and Richard Pawson for teaching Computer Science (CS) principles and Assembly Language. It is targetted particularly towards the AQA A-level computing syllabus. It is exceptionally user-friendly and fast, and great fun to experiment with!

Free online student textbook on the topic:
[1] Richard Pawson (with Peter Higginson), Computer Science from the Metal Up - Assembly Language Programming, v1.0.0, 2020
https://peterhigginson.co.uk/ARMlite/Assembly%20Language%20-%20Student%20version.pdf

Online simulator for the ARMlite ISA here:
https://www.peterhigginson.co.uk/ARMlite/

@cellularmitosis
cellularmitosis / README.md
Last active March 6, 2025 07:14
Tech Links
@SpexGuy
SpexGuy / tagged_unions.zig
Last active April 19, 2025 23:57
Zig: Using tagged unions to make a simple json formatter
const JsonString = struct {
value: []const u8,
};
const JsonNumber = struct {
value: f64,
};
const JsonObject = struct {
const Property = struct {
name: []const u8,
value: JsonValue,
@kraptor
kraptor / ui.nim
Created July 4, 2019 20:01
Mu - Chip-8 Emulator UI made in Nim with Imgui
import os
import math
import strutils
import strformat
import nimgl/opengl
import nimgl/glfw
import nimgl/imgui
import nimgl/imgui/impl_opengl
import nimgl/imgui/impl_glfw
@justinian
justinian / linux-x64-nasm-cheatsheet.md
Last active April 3, 2026 13:06
x64 NASM Cheat Sheet

x64 NASM cheat sheet

Registers

64 bit 32 bit 16 bit 8 bit
A (accumulator) RAX EAX AX AL
B (base, addressing) RBX EBX BX BL
C (counter, iterations) RCX ECX CX CL
D (data) RDX EDX DX DL
@3n21c0
3n21c0 / main.go
Last active December 30, 2025 18:52
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"