Skip to content

Instantly share code, notes, and snippets.

View akxcix's full-sized avatar
🛠️
building something...

Adarsh Kumar akxcix

🛠️
building something...
View GitHub Profile
@dustinrouillard
dustinrouillard / snowflake.sql
Created January 17, 2021 02:34
PostgreSQL Snowflake ID Generator Function
CREATE SEQUENCE IF NOT EXISTS public.global_id_sequence;
CREATE OR REPLACE FUNCTION id_generator(OUT result BIGINT) AS $$
DECLARE
epoch BIGINT := 1610850820000;
seq_id BIGINT;
now_millis BIGINT;
shard_id INT := 1;
BEGIN
SELECT nextval('public.global_id_sequence') % 1024 INTO seq_id;
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active May 15, 2024 09:49
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 15, 2024 19:48
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@xero
xero / irc.md
Last active May 3, 2024 23:19
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@roachhd
roachhd / README.md
Last active May 15, 2024 04:18
Basics of BrainFuck

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

BrainFuck Programming Tutorial by: Katie

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

INTRODUCTION