Skip to content

Instantly share code, notes, and snippets.

View almostSouji's full-sized avatar
🦊

Souji almostSouji

🦊
  • 07:26 (UTC +01:00)
View GitHub Profile
@almostSouji
almostSouji / dirprops.py
Last active June 10, 2024 05:58
Simple py script to find the longest and highest entropy lines in a file/directory
#!/usr/bin/env python3
import os
import sys
from collections import Counter
from math import log
def entropy(text):
cc = Counter(text)
ps = [float(cc[c]/len(text)) for c in cc]
@almostSouji
almostSouji / dirdiff.sh
Last active April 3, 2024 10:24
Get a diff of two directories using git (sifferences to orginal code basis)
git diff --no-index --ignore-all-space a/path b/path > some_filename
@almostSouji
almostSouji / assignment.tex
Created May 2, 2023 12:59
LaTex assignment template
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{
a4paper,
total={170mm,257mm},
left=20mm,
top=20mm,
footskip = \dimexpr\headsep+\ht\strutbox\relax,
}
@almostSouji
almostSouji / TOKEN
Last active October 14, 2024 17:49
You leaked your token. This is probably how you get here
Do not leak your token!

Keybase proof

I hereby claim:

  • I am almostsouji on github.
  • I am moeh (https://keybase.io/moeh) on keybase.
  • I have a public key ASBoHa8beHBnVU1z38yFC428OOr-eGt0eI9NnIEZf_U-Cgo

To claim this, I am signing this object:

@almostSouji
almostSouji / 01_intro.md
Last active October 19, 2024 10:10
Discord.js: Collections but Cookies

Discord.js Collections explained with cookies

Intro

I keep seing people that have issues with understanding our Collection class.

Note

Boiled down to essentials, Collection just extends the base JavaScript Map class with Array-like methods. If that's enough for you to understand, you can stop reading here.