Skip to content

Instantly share code, notes, and snippets.

@pizlonator
pizlonator / pizlossafull.md
Last active February 13, 2025 17:45
How I implement SSA form

This document explains how I would implement an SSA-based compiler if I was writing one today.

This document is intentionally opinionated. It just tells you how I would do it. This document is intended for anyone who has read about SSA and understands the concept, but is confused about how exactly to put it into practice. If you're that person, then I'm here to show you a way to do it that works well for me. If you're looking for a review of other ways to do it, I recommend this post.

My approach works well when implementing the compiler in any language that easily permits cyclic mutable data structures. I know from experience that it'll work great in C++, C#, or Java. The memory management of this approach is simple (and I'll explain it), so you won't have to stress about use after frees.

I like my approach because it leads to an ergonomic API by minimizing the amount of special cases you have to worry about. Most of the compiler is analyses and transformations ov

@will4381
will4381 / index.html
Created February 13, 2025 15:25
colors-in-viewport
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Visible Colors</title>
<style>
body { margin: 0; padding: 0; }
.section {
height: 100vh;
display: flex;
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"theme": "Catppuccin Latte",
@victusfate
victusfate / glfwSample.cc
Last active February 13, 2025 17:41
glfw opengl sample program
#include <GLFW/glfw3.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
using namespace std;
static void error_callback(int error, const char* description)
{
fputs(description, stderr);
@sarkrui
sarkrui / install-cloudflared.md
Created May 31, 2023 12:19
Install Cloudflared on Alpine Linux

Cloudflared Setup Guide

This guide will walk you through setting up Cloudflared on your system.

Pre-Requisites

You need to have administrative (sudo) access to your system.

Here are the steps to install Cloudflared.

@Heliodex
Heliodex / updateJan25.md
Created February 13, 2025 17:38
first 2025 monthly Heliodex project update

Heliodex project update – January 2025

Hello again! Your monthly update is here once again, with the usual side of assorted sections of rambling.

Some bug fixes and a better external API have been added, alongside four string library functions I was hesitant to implement: find, match, gmatch, and gsub. Pattern matching was, as I had suspected, a pain in the ass to get working. What next, maybe metatable support? Eh, perhaps if they actually turn out to be useful someday.

Pretty much all standard library functions apart from the really naughty ones have been implemented now, so I'll call it ready for further battle-testing as part of a larger-scale system. If any bugs crop up that I haven't caught yet, they'll probably be really insane time-sink ones.

@kgwebsites
kgwebsites / kp
Created December 9, 2020 00:48
Kill all processes running on a local port
#!/bin/bash
port="";
if [ "$1" != "" ]; then
port=$1
fi
pid=$(lsof -i:$port -t);set -f;a=(${pid})
for e in ${a[@]}
@madkoding
madkoding / install-docker-deepin.sh
Last active February 13, 2025 17:32
Install Docker-CE script for Deepin Linux
#!/bin/bash
echo "Starting Docker installation on Deepin Linux..."
# Define a mapping from Deepin version to Debian version
map_deepin_to_debian() {
if [ "$1" -lt 20 ]; then
echo "stretch"
elif [ "$1" -ge 20 ]; then
echo "buster"

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@arsho
arsho / Add SSH Key to Bitbucket OR Github in Ubuntu 16.04.md
Last active February 13, 2025 17:31
Step by step instructions to add SSH key files in Bitbucket or Github

Add SSH Key to Bitbucket / Github in Ubuntu 16.04

What does SSH Keys do in Github / Bitbucket?

Set up SSH to reduce the risk of exposing your username and password. Some reasons you might want to use SSH key base authentication:

  • Is more effective if you push and pull from Bitbucket many times a day.
  • Removes the need to enter a password each time you connect.