Skip to content

Instantly share code, notes, and snippets.

View panchoh's full-sized avatar
🍊

pancho horrillo panchoh

🍊
View GitHub Profile
@smx-smx
smx-smx / XZ Backdoor Analysis
Last active February 26, 2025 01:17
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@thesamesam
thesamesam / xz-backdoor.md
Last active May 27, 2025 17:55
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@alexedwards
alexedwards / Makefile
Last active May 26, 2025 06:25
Boilerplate Makefile for Go projects
# Change these variables as necessary.
main_package_path = ./cmd/example
binary_name = example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@dietrichm
dietrichm / 99-logitech-webcam.rules
Last active May 7, 2025 03:58
Logitech C505e HD Webcam flickering
SUBSYSTEM=="video4linux", KERNEL=="video[0-9]*", ATTRS{product}=="C505e HD Webcam", ATTR{index}=="0", RUN+="/usr/bin/v4l2-ctl -d $devnode --set-ctrl=power_line_frequency=1"
@camsaul
camsaul / preview-markdown.el
Last active November 12, 2021 02:09
Markdown live previews source
;;; -*- lexical-binding: t; coding: utf-8; -*-
(defun cam/-scroll-percentage ()
(/ (float (line-number-at-pos (window-start)))
(float (line-number-at-pos (point-max)))))
(defun cam/-set-window-start-to-percentage (scroll-percentage)
(goto-char (point-min))
(let ((target-line-number (truncate (* (line-number-at-pos (point-max)) scroll-percentage))))
(forward-line (1- target-line-number)))
@coconut49
coconut49 / main.go
Created August 21, 2019 03:23
Golang SSL Pinning
package main
import (
"context"
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"encoding/pem"
"errors"
"fmt"
@fnky
fnky / ANSI.md
Last active May 30, 2025 23:33
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@tjamet
tjamet / tls-http-server.go
Created April 13, 2018 18:57
TLS HTTP server using in-memory certificate
// From https://github.com/golang/go/blob/c0547476f342665514904cf2581a62135d2366c3/src/net/http/server.go#L3223
// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
// connections. It's used by ListenAndServe and ListenAndServeTLS so
// dead TCP connections (e.g. closing laptop mid-download) eventually
// go away.
type tcpKeepAliveListener struct {
*net.TCPListener
}
func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 30, 2025 01:44
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example