Skip to content

Instantly share code, notes, and snippets.

View PsY4's full-sized avatar

Alexandre Garcia PsY4

  • TroisSix
  • Venelles, France
View GitHub Profile
@aditya-r-m
aditya-r-m / crgb.cc
Last active July 13, 2024 15:11
Custom Trident Z DRAM RGB Turndown
// Pieces extracted & trimmed from https://gitlab.com/CalcProgrammer1/OpenRGB
// Basic usage : g++ crgb.cc -o ledoff && ./ledoff
// For turning off RAM LEDs at startup : compile in root home directory & add "@reboot /root/ledoff" to "sudo crontab -e"
#include <cstring>
#include <iostream>
#include <linux/i2c-dev.h>
#include <linux/i2c.h>
#include <sys/ioctl.h>
@Stoffo
Stoffo / twig_file_date_extension.php
Last active May 24, 2020 07:47
Twig Function to get the file mtime in template for HTTP Caching
<?php
$function_filedate = new Twig_SimpleFunction(
'fileDate',
/**
* @param $file_path
* This function generates a new file path with the last date of filechange
* to support better better client caching via Expires header:
* i.e: