Skip to content

Instantly share code, notes, and snippets.

@str4d
str4d / DemangleRust.py
Last active May 7, 2024 01:40
Ghidra script for demangling Rust symbols
# Attempts to demangle all mangled symbols in the current program using the Rust
# mangling schemes, and replace the default symbol and function signature
# (if applicable) with the demangled symbol.
#
# License: MIT OR Apache-2.0
#@author Jack Grigg <thestr4d@gmail.com>
#@category Symbol
import string
@jremmen
jremmen / mm.js
Last active May 7, 2024 01:39
js: matrix multiplication using dot product and transposition
mmultiply = function(a,b) {
return a.map(function(x,i) {
return transpose(b).map(function(y,k) {
return dotproduct(x, y)
});
});
}
dotproduct = function(a,b) {
return a.map(function(x,i) {
@JGalego
JGalego / interviewer.py
Last active May 7, 2024 01:37
Job interviewer 🧑🏻‍💼 powered by Amazon Bedrock / Claude
r"""
____ _ _
| _ \ | | | |
| |_) | ___ __| |_ __ ___ ___| | __
| _ < / _ \/ _` | '__/ _ \ / __| |/ /
| |_) | __/ (_| | | | (_) | (__| <
|____/ \___|\__,_|_| \___/ \___|_|\_\
|_ _| | | (_)
| | _ __ | |_ ___ _ ____ ___ _____ _____ _ __
| | | '_ \| __/ _ \ '__\ \ / / |/ _ \ \ /\ / / _ \ '__|
@OrionReed
OrionReed / dom3d.js
Last active May 7, 2024 01:36
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@markasoftware
markasoftware / enterprise_token.rb
Last active May 7, 2024 01:36
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@roachhd
roachhd / README.md
Last active May 7, 2024 01:28
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@tarikguney
tarikguney / login-form.component.css
Last active May 7, 2024 01:27
Login Form Design in Angular Material
.login-form-flex {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.button-flex-container {
display: flex;
width: 100%;
@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active May 7, 2024 01:26
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
@VoxelPrismatic
VoxelPrismatic / hexToRgba.js
Created May 6, 2024 23:25
hexToRgba, using lots of bitwise operations
function hexToRgba(st) {
if(st.startsWith("#"))
st = st.slice(1);
const len = st.length; // I don't know how JS works, I suspect this is recalculated
const has_alpha = !(len % 4);
if(len % 3 && !has_alpha)
throw new Error("invalid hex code");
var val = Number.parseInt(st, 16);