Skip to content

Instantly share code, notes, and snippets.

View rgaudin's full-sized avatar

rgaudin rgaudin

  • yɛlɛman
  • Bamako, Mali
View GitHub Profile
@mhzawadi
mhzawadi / pi_version.sh
Last active July 16, 2019 15:14
Get the Pi model
#!/bin/sh
# https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
cpuinfo=`cat /proc/cpuinfo | grep "Revision"|awk -F': ' '{printf $2}'`
model=`cat /sys/firmware/devicetree/base/model`
case ${cpuinfo} in
"0002" )
echo "Revision : 0002 (Model B Rev 1, 256MB)" ;;
"0003" )
@fabiolimace
fabiolimace / UUIDv6.sql
Last active October 30, 2024 19:52
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023-2024 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@benoit74
benoit74 / zimls.py
Created October 28, 2024 08:17
Zimls v2, computing aggregated path segment sizes and sorting display by path aggregated size
# !/usr/bin/env python3
import argparse
import logging
import sys
from typing import NamedTuple
from pydantic import BaseModel
import humanfriendly