Skip to content

Instantly share code, notes, and snippets.

View DimitriGilbert's full-sized avatar

Dimitri Gilbert DimitriGilbert

View GitHub Profile
@DimitriGilbert
DimitriGilbert / upload.php
Created March 8, 2013 04:55
correction of upload.php fuel core class
<?php
/**
* Part of the Fuel framework.
*
* @package Fuel
* @version 1.0
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2012 Fuel Development Team
@DimitriGilbert
DimitriGilbert / gist:5726632
Created June 7, 2013 02:10
a get object method for S3 driver in fuel-cloud-storage
<?php
/**
* Amazon Web Services S3 Driver.
* Use Composer "require": {"aws/aws-sdk-php": "2.*"}
*
* @package Cloud_Storage
* @author Juan Manuel Torres <juan.torres@alleluu.com>
* @license MIT License
* @copyright 2013-2014 Alleluu Development team
* @link https://github.com/alleluu/fuel-cloud-storage
@DimitriGilbert
DimitriGilbert / yt-mpv.sh
Last active March 5, 2024 15:43
a simple bash program to play content from YT using mpv. It has a playlist like feature using --next "url". I use it on my RPI homelab from SSH.
#!/bin/bash# @parseArger-begin
# @parseArger-help "I send an SOS to the world" --option "help" --short-option "h"
# @parseArger-verbose --option "verbose" --level "0" --quiet-option "quiet"
# @parseArger-declarations
# @parseArger pos vid "video id"
# @parseArger opt base-url "service url" --default-value "https://www.youtube.com/watch?v="
# @parseArger opt next "play next" --short n --repeat --alias playlist
# @parseArger opt player-command "player command" --short p --default-value "mpv" --repeat --alias player
# @parseArger opt set-display "set display id" --default-value "0"
# @parseArger opt pulse-out "pulseaudio output sink id" --default-value "2"
@DimitriGilbert
DimitriGilbert / gist:7a6e1778b759364369d24ec480d5df71
Created March 10, 2024 17:25
my fedora daily update script
#!/bin/bash
# @parseArger-begin
# @parseArger-help "I send an SOS to the world" --option "help" --short-option "h"
# @parseArger-declarations
# @parseArger opt shutdown "shutdown after the value"
# @parseArger flag dnf "update dnf package" --on
# @parseArger flag flathub "update flatpak" --on
# @parseArger flag yes "auto yes" --short y
# @parseArger-declarations-end
@DimitriGilbert
DimitriGilbert / gist:15ba85746846ff77378ac3aea7ef3c81
Last active July 1, 2024 10:17
groupier ! groups a bunch of files in a single output to feed to LLM
#!/bin/bash
# Check if parseArger is installed
if ! command -v parseArger &> /dev/null; then
read -p "parseArger is not installed. Would you like to install it? (yes/y to confirm): " install_parseArger
if [[ "$install_parseArger" =~ ^[Yy](es)?$ ]]; then
# Install parseArger
echo "Installing parseArger..."
# Download the install script
curl -s https://raw.githubusercontent.com/DimitriGilbert/parseArger/main/utils/get_parseArger -O
# Make it executable
@DimitriGilbert
DimitriGilbert / create_groupier.sh
Created July 1, 2024 10:19
groupier ! groups a bunch of files in a single output to feed to LLM Raw
#!/bin/bash
# Check if parseArger is installed
if ! command -v parseArger &> /dev/null; then
read -p "parseArger is not installed. Would you like to install it? (yes/y to confirm): " install_parseArger
if [[ "$install_parseArger" =~ ^[Yy](es)?$ ]]; then
# Install parseArger
echo "Installing parseArger..."
# Download the install script
curl -s https://raw.githubusercontent.com/DimitriGilbert/parseArger/main/utils/get_parseArger -O
# Make it executable
@DimitriGilbert
DimitriGilbert / linky.cpp
Created July 5, 2024 14:18
TeleInfo client Linky on stationIO
#include <Arduino.h>
#include <LibTeleinfo.h>
#include "./Station.h"
#include "./sensors/linky.h"
// use this file as main.cpp in a clone of https://github.com/DimitriGilbert/StationIO-Station
// libTeleinfo https://github.com/hallard/LibTeleinfo
// there is some hardware but everything is explained on the lib page
@DimitriGilbert
DimitriGilbert / ollama_rocm_apu.sh
Created January 4, 2025 20:20
Ollama using AMD APU with ROCm
#!/bin/bash
# @parseArger-begin
# @parseArger-help "I send an SOS to the world" --option "help" --short-option "h"
# @parseArger-verbose --option "verbose" --level "0" --quiet-option "quiet"
_has_colors=0
if [ -t 1 ]; then # Check if stdout is a terminal
ncolors=$(tput colors 2>/dev/null)
if [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
_has_colors=1
fi
#!/bin/bash
# @parseArger-begin
# @parseArger-help "Display file contents with separators" --option "help" --short-option "h"
# @parseArger-verbose --option "verbose" --level "0" --quiet-option "quiet"
# @parseArger-leftovers leftovers
_has_colors=0
if [ -t 1 ]; then # Check if stdout is a terminal
ncolors=$(tput colors 2>/dev/null)
if [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
_has_colors=1