Skip to content

Instantly share code, notes, and snippets.

View rebane2001's full-sized avatar
🦊

Lyra Rebane rebane2001

🦊
View GitHub Profile
@angeld23
angeld23 / vanished_tweet_recovery.user.js
Last active March 4, 2024 20:18
Vanished Tweet Recovery: Detects whenever a tweet mysteriously vanishes from your timeline for no reason and allows you to re-open it
// ==UserScript==
// @name Vanished Tweet Recovery
// @namespace https://d23.dev/
// @version 1.1
// @description Detects whenever a tweet mysteriously vanishes from your timeline for no reason and allows you to re-open it
// @author angeld23
// @match *://*.twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==/UserScript==
@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'
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active April 20, 2024 16:35
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m

\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ). If you wish to send colored text without using your bot you need to copy the character from the website.

@unrealwill
unrealwill / collisionLSH.py
Created August 8, 2021 10:20
Proof of Concept : generating collisions on a neural perceptual hash
import tensorflow as tf #We need tensorflow 2.x
import numpy as np
#The hashlength in bits
hashLength = 256
def buildModel():
#we can set the seed to simulate the fact that this network is known and doesn't change between runs
#tf.random.set_seed(42)
model = tf.keras.Sequential()
@corentinbettiol
corentinbettiol / README.md
Last active January 12, 2024 15:47
Tiny js code that will simulate a 3D view of your elements, like firefox used to do.
@stanographer
stanographer / README.md
Last active July 19, 2021 13:43 — forked from morinted/README.md
Remove TypeRacer Input limit

This script removes the input length limit which can trip up Plover users.

Simply install the script into TamperMonkey (Chrome) or GreaseMonkey (Firefox) and get racing.

The script was created by community member nimble

/*
* clang -O2 -s -lGL -ldl -shared fake_glvendor.c -fPIC -o fake_glvendor.so
*/
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
@udayvunnam
udayvunnam / lru.js
Last active June 6, 2021 06:10
Least Recently Used cache - Implementing LRU cache in Javascript
class Node {
constructor(key, value, next = null, prev = null) {
this.key = key;
this.value = value;
this.next = next;
this.prev = prev;
}
}
class LRU {
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 22, 2024 16:30
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@cpressey
cpressey / glitchtool.py
Created April 28, 2015 19:19
Really quick-and-dirty Python script to create glitched (intentionally corrupted) JPEGs
#!/usr/bin/env python
# the contents of this file are in the public domain
import os
import random
import sys
def main(args):
filename = args[0]