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
@ityonemo
ityonemo / test.md
Last active April 29, 2025 08:28
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 April 23, 2025 15:01
Some notes, tools, and techniques for reverse engineering Golang binaries