Skip to content

Instantly share code, notes, and snippets.

View WaffleLapkin's full-sized avatar
🧇
exhaused and vaguely burned

Waffle Maybe WaffleLapkin

🧇
exhaused and vaguely burned
View GitHub Profile
@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active May 31, 2024 11:23
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
@0xabad1dea
0xabad1dea / newspaper.html
Last active November 10, 2023 15:54
cohost newspaper template
<div style="width:100%; font-family:serif;font-size:16px;text-align:justify;">
<div style="font-weight:900;text-align:center;font-size:48px;border-bottom:3px solid black;font-variant:small-caps;margin-bottom:0px;">
The Eggbug Times
</div>
<div style="font-style:italic; font-size:18px;text-align:center;">
the fourth website to ever exist
</div>
<div style="text-transform:uppercase;font-size:48px;text-align:center;">
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
/*
@WaffleLapkin
WaffleLapkin / what.md
Last active January 1, 2022 12:19
Unordered list of things I don't understand about my computer

What?

I'm using Linux, Arch Linux to be exact. This may have been a bad decision considering how bad am I at computers, but there is no turning back I believe. I can't use windows, for me it's like holy water to a demon or sunlight to a vampire. And for macOS I don't have money.

But, since I'm pretty terrible at computers I don't understand a lot of things. Some things just seem broken, but I have no way of fixing them or even understanding what is happening. This file contains an unordered list of such things.

@WaffleLapkin
WaffleLapkin / remove_gps.bash
Created September 14, 2021 20:07
Remove GPS information from exif tags of all pictures in `./dir`
exiv2 \
-M'del Exif.GPSInfo.GPSLatitudeRef' \
-M'del Exif.GPSInfo.GPSLatitude' \
-M'del Exif.GPSInfo.GPSLongitudeRef' \
-M'del Exif.GPSInfo.GPSLongitude' \
-M'del Exif.GPSInfo.GPSAltitudeRef' \
-M'del Exif.GPSInfo.GPSAltitude' \
-M'del Exif.GPSInfo.GPSTimeStamp' \
-M'del Exif.GPSInfo.GPSImgDirectionRef' \
-M'del Exif.GPSInfo.GPSImgDirection' \
@Disasm
Disasm / main.rs
Created August 25, 2020 16:49
rust-cleaner
use std::process::Command;
use std::path::Path;
fn main() {
println!("Scanning file system...");
let output = Command::new("locate").arg("Cargo.toml").output().expect("Failed to create process").stdout;
for line in output.split(|b| *b == 0x0a) {
if let Ok(s) = std::str::from_utf8(line) {
if s.is_empty() {
continue;
@getdave
getdave / bookmarklet-github-expand-all-load-more.js
Created June 2, 2020 10:56
Bookmarktlet to automatically expand all those "Load more..." links into your Github PRs.
javascript:(function()%7Bfunction%20githubLoadAllPRComments()%20%7B%0A%0A%20%20%20%20function%20recursiveExpandLoadMore()%20%7B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Remove%20all%20existing%20timers%0A%20%20%20%20%20%20%20%20if(theTimeout)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20clearTimeout(theTimeout)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20const%20disabledLoadBtns%20%3D%20document.querySelector('.ajax-pagination-btn%5Bdisabled%5D')%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20If%20any%20buttons%20are%20already%20in%20the%20loading%20state%20then%20requeue%0A%20%20%20%20%20%20%20%20if(disabledLoadBtns)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20theTimeout%20%3D%20setTimeout(recursiveExpandLoadMore%2C%201000)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20const%20loadBtn%20%3D%20document.querySelector('.ajax-pagination-btn%3Anot(%5Bdisabled%5D)')%3B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%2F%2F%20If%20there%20are%20no%20more%20load%2
@setazer
setazer / paginator.py
Last active June 7, 2019 07:43
Telebot paginator
from math import ceil
from random import randint
from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
from telebot.apihelper import ApiException
class InlinePaginator():
def __init__(self, msg, data, items_per_row=5, max_rows=5):
self.data = data
self.current_page = 1
self.items_per_row = items_per_row
@rygorous
rygorous / gist:e0f055bfb74e3d5f0af20690759de5a7
Created May 8, 2016 06:54
A bit of background on compilers exploiting signed overflow
Why do compilers even bother with exploiting undefinedness signed overflow? And what are those
mysterious cases where it helps?
A lot of people (myself included) are against transforms that aggressively exploit undefined behavior, but
I think it's useful to know what compiler writers are accomplishing by this.
TL;DR: C doesn't work very well if int!=register width, but (for backwards compat) int is 32-bit on all
major 64-bit targets, and this causes quite hairy problems for code generation and optimization in some
fairly common cases. The signed overflow UB exploitation is an attempt to work around this.