Skip to content

Instantly share code, notes, and snippets.

View djerfy's full-sized avatar
:octocat:
Developer

Jeremy Chabernaud djerfy

:octocat:
Developer
View GitHub Profile
@djerfy
djerfy / check-chart-artifacthub.py
Created February 11, 2023 10:32
🐳 Check your Chart dependencies updates from ArtifactHub
#!/usr/bin/env python3
import sys, json, yaml, requests, argparse, os
from rich.console import Console
from rich.table import Table
baseurl = "https://artifacthub.io/api/v1"
headers = {"Content-Type": "application/json"}
parser = argparse.ArgumentParser()
@djerfy
djerfy / thumbnail.py
Created May 22, 2022 15:25
Create a thumbnail image
import sys
from PIL import Image
with Image.open(sys.argv[1]) as image:
image.thumbnail((128, 128))
image.save(thumbnail_path, "JPEG")
@djerfy
djerfy / youtube-download.py
Created May 15, 2022 17:15
How to download Youtube videos through Python
from pytube import YouTube
video = YouTube("https://www.youtube.com/ID")
video.streams.filter(res="1024p").first().download("~/Downloads/")
@djerfy
djerfy / system_memorydump.py
Created April 23, 2017 07:05
Python | Memory Dump Process (with PID on argument)
#!/usr/bin/env python
import ctypes, re, sys
c_ptrace = ctypes.CDLL("libc.so.6").ptrace
c_pid_t = ctypes.c_int32
c_ptrace.argtypes = [ctypes.c_int, c_pid_t, ctypes.c_void_p, ctypes.c_void_p]
def ptrace(attach, pid):
op = ctypes.c_int(16 if attach else 17)
@djerfy
djerfy / keybase.md
Last active March 26, 2022 22:47
Keybase verification

Keybase proof

I hereby claim:

  • I am djerfy on github.
  • I am djerfy (https://keybase.io/djerfy) on keybase.
  • I have a public key ASACsQf3eiGFgkNUWok3BDIIBWDxP49o8O4sCZHG0fs6Kwo

To claim this, I am signing this object: