Skip to content

Instantly share code, notes, and snippets.

View snehesht's full-sized avatar

Snehesh snehesht

View GitHub Profile
@LiquidityC
LiquidityC / Makefile
Last active December 1, 2023 03:24
Generic drop in Makefile
VERSION = \"1.0.0\"
PREFIX ?= out
INCDIR = inc
SRCDIR = src
LANG = c
OBJDIR = .obj
MODULE = binary_name
CC = gcc
@yzdbg
yzdbg / auto-dr.md
Last active November 3, 2023 17:11

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@JohnBra
JohnBra / useStorage.tsx
Created July 4, 2022 22:44
Typed React useStorage hook for chrome extensions
import { Dispatch, SetStateAction, useState, useEffect, useCallback, useRef } from 'react';
export type StorageArea = 'sync' | 'local';
// custom hook to set chrome local/sync storage
// should also set a listener on this specific key
type SetValue<T> = Dispatch<SetStateAction<T>>;
/**
@iosifnicolae2
iosifnicolae2 / Readme.md
Last active March 12, 2024 19:42
Youtube is Boring

How To Make Youtube Less Boring

Tutorial: https://www.youtube.com/watch?v=hIqMrPTeGTc
Paste the below code in your browser console (F12 > Console):

(()=>{
    markAllVideosAsNotBeingInteresting({
        iterations: 1
    });
})();
@cellularmitosis
cellularmitosis / README.md
Last active April 16, 2023 17:49
Quick-n-dirty QEMU script to spin up Debian on various CPU's
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@nileshtrivedi
nileshtrivedi / home-server.md
Last active January 10, 2024 06:30
Home Server setup: Raspberry PI on Internet via reverse SSH tunnel

Raspberry Pi on Internet via reverse SSH tunnel

HackerNews discussed this with many alternative solutions: https://news.ycombinator.com/item?id=24893615

I already have my own domain name: mydomain.com. I wanted to be able to run some webapps on my Raspberry Pi 4B running perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok would work but the free plan is too restrictive.

I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.

@MineRobber9000
MineRobber9000 / 2fa
Created April 3, 2020 03:45
2-factor authentication terminal app in Python
#!/usr/bin/env python
import os, os.path, stat, sys, base64
# TOTP lib inlined
import time, hmac, base64, hashlib, struct
def pack_counter(t):
return struct.pack(">Q", t)
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet