Skip to content

Instantly share code, notes, and snippets.

View dietercastel's full-sized avatar
💭
🤔

Dieter Castel dietercastel

💭
🤔
View GitHub Profile
@dietercastel
dietercastel / jpg2png2invert.py
Last active September 9, 2020 08:12
Convert JPG -> PNG -> INVERTED
from PIL import Image
import PIL.ImageOps
#Using PIL/pillow (install with 'pip3 install pillow' )
name = 'RPS-g2.jpg'
outname = 'RPS-g2.png' #png extension
im = Image.open(name)
inv = PIL.ImageOps.invert(im) #invert opperation
inv.save(outname)
@mbilokonsky
mbilokonsky / thinking_like_a_function.md
Last active October 25, 2021 14:47
Thinking Like a Function

Thinking Like a Function

Part 1: What's a function?

As a software engineer, you probably think of a function as a unit of code that takes some arguments and returns some value, eg:

 function square(x) { 
   return x * x;
 }
@lgg
lgg / readme.md
Last active May 2, 2024 20:14
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.