Skip to content

Instantly share code, notes, and snippets.

@Shikkic
Shikkic / ClearSlackSavedDeletedMessages.js
Last active April 7, 2025 05:33
Remove all saved (deleted) messages from your saved view in Slack
// Remove all saved (deleted) messages from your saved view in Slack
// Open Slack in a web browser and log in
// Go to your Saved/Later messages screen
// Click on either In Progress, Archived, or Completed for the list you want to delete.
// F12 to raise dev console
// Paste the below
// Wait a while till it does its thing. If you need to stop it, close the tab.
(async function deleteDeletedLaterItems() {
@Zyoruk
Zyoruk / gist:2590ac75fe86cfe8f671963218aa9b6f
Created April 7, 2025 05:32
Editor Rules for Angular & Nest JS
# ✅ Codebase Rules for Cursor (NestJS + Angular 17)
## 🧠 A. General Rules for OOP Web Apps
1. **Follow OOP Design Principles**
- Use **SOLID**, **KISS**, and **DRY** principles.
- Prioritize readability, maintainability, and modularity.
2. **Keep Files Concise**
- Files should not exceed **~200 lines**.
@programmerdave
programmerdave / ClearSlackSavedMessages.js
Last active April 7, 2025 05:32
Remove all saved messages from your saved view in Slack
// Remove all saved messages from your saved view in Slack
// Open Slack in a web browser and log in
// Go to your Saved/Later messages screen
// Click on either In Progress, Archived, or Completed for the list you want to delete.
// F12 to raise dev console
// Paste the below
// Wait a while till it does its thing. If you need to stop it, close the tab.
(async function(x) {
@ScottMaclure
ScottMaclure / slack_draft_deleter.js
Last active April 7, 2025 05:32
Slack Draft Deleter
// Remove all drafts from your drafts view
// Navigate to drafts
// F12 to raise dev console
// Paste the below
(async function(x) {
for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) {
e.click();
await new Promise(resolve => setTimeout(resolve, 500))
document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click();
await new Promise(resolve => setTimeout(resolve, 1500))
@meain
meain / loading_messages.js
Last active April 7, 2025 05:31
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@wh1te4ever
wh1te4ever / TrollDetector.m
Last active April 7, 2025 05:30
TrollStore Detector
//
// ViewController.m
// JBDetectTest
//
// Created by seo on 3/27/25.
//
#import "ViewController.h"
#import <dlfcn.h>
@joshuabradley012
joshuabradley012 / Object collisions with canvas
Last active April 7, 2025 05:27
An example of 2D collisions using JavaScript Canvas
class State {
constructor(display, actors) {
this.display = display;
this.actors = actors;
}
update(time) {
/**
* provide an update ID to let actors update other actors only once
@jwickens
jwickens / database.py
Last active April 7, 2025 05:26
Pytorch-like iterable Dataset example backed by async iterator (postgres)
import asyncpg
async def create_pool():
pool = await asyncpg.create_pool(
database="research",
user="jwickens",
setup=setup_connection,
min_size=32,
max_size=32
)
@supechicken
supechicken / crostini-waydroid.md
Last active April 7, 2025 05:23
[Guide] Bringing Android functionality to ChromeOS Flex with Waydroid

Bringing Android functionality to ChromeOS Flex with Waydroid

Note

Check here for video demonstration

Note

This guide works on Chromebooks with Android subsystem support (ARC++/ARCVM)

Tested on ChromeOS Flex v134.0.6998.130

@Brandonbr1
Brandonbr1 / readme.md
Last active April 7, 2025 05:15
This Simply Disables all useless or uneeded for windows 10/11 services to make your computer faster.

Make sure you run this script as admin,otherwise it will fail to execute

About this script

Warning this is a hardcore removal script, unlike the others, This tries to fully remove almost all uneeded services, without making the computer unusable

Disclamer

By running or using this script you accept. I am not hield responsible if anything breaks or stops working on your computer/machine. That is your fault and it is up to you to re-enable the service.

Printers will not work with this script.