Skip to content

Instantly share code, notes, and snippets.

View avestura's full-sized avatar
🍀
tell me about the odds

Avestura avestura

🍀
tell me about the odds
View GitHub Profile
@Eun
Eun / status.sql
Last active June 16, 2022 04:36
Get Skype for Business Status via SQL
SELECT LOWER(UserAtHost) AS UserAtHost, Status=
CASE
WHEN Availability BETWEEN 0 AND 2999 THEN Availability
WHEN Availability BETWEEN 3000 AND 4499 THEN 'Available'
WHEN Availability BETWEEN 4500 and 5999 THEN 'Available - Idle'
WHEN Availability BETWEEN 6000 and 7499 THEN 'Busy'
WHEN Availability BETWEEN 7500 and 8999 THEN 'Busy - Idle'
WHEN Availability BETWEEN 9000 and 11999 THEN 'Do not Disturb'
WHEN Availability BETWEEN 12000 and 14999 THEN 'Be right back'
WHEN Availability BETWEEN 15000 and 17999 THEN 'Away'
@mbcrump
mbcrump / Resources.md
Last active September 26, 2020 09:13
Scott's Build 2019 Talk Resources
@MarioHewardt
MarioHewardt / enable_ebpf_on_wsl2
Last active August 18, 2025 11:48
Enable EBPF on WSL2
By default, EBPF programs will not run on WSL2 due to required kernel modules missing. The following example error is an
indication of this problem:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microso
ft-standard/modules.dep.bin'
modprobe: FATAL: Module kheaders not found in directory /lib/modules/4.19.84-microsoft-standard
chdir(/lib/modules/4.19.84-microsoft-standard/build): No such file or directory
To fix this you need to rebuild the WSL2 kernel with the missing kernel modules. The below instructions are for Ubuntu 18.04 WSL2.
1. git clone https://github.com/microsoft/WSL2-Linux-Kernel.git
@ityonemo
ityonemo / test.md
Last active October 23, 2025 01:27
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@p4bl0-
p4bl0- / 00_readme.md
Last active January 2, 2025 09:03
A complete compiler for a simple language (in less than 150 LoC)

This project is a tiny compiler for a very simple language consisting of boolean expression.

The language has two constants: 1 for true and 0 for false, and 4 logic gates: ! (not), & (and), | (or), and ^ (xor).

It can also use parentheses to manage priorities.

Here is its grammar in BNF format:

expr ::= "0" | "1"

<html lang="en"><head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Temporary Pastebin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ipfs/0.54.4/index.min.js" integrity="sha512-6GHE5kFKM1y+tmjSWrTCF13qsIqV9hDYYwrZ9iu/7wnoY4qvq/u7qSVKN4iDk0xeI7pLv6h3nBRp64aIYya8KA==" crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script>
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@0xdevalias
0xdevalias / reverse-engineering-golang.md
Last active October 19, 2025 19:54
Some notes, tools, and techniques for reverse engineering Golang binaries