Skip to content

Instantly share code, notes, and snippets.

View axi's full-sized avatar

Alexis Urien axi

View GitHub Profile
<?php
/*
* This file is part of the Twig Extension TruncateHtmlExtension.
*
* Author Leon Radley <[email protected]>
* Rewrite by Instabledesign
*
*
* Truncate Html string without stripping tags
@axi
axi / wallpaper-gnome-grand-bornand-webcam.sh
Last active November 25, 2022 10:05
Set a wallpaper from Le grand bornand webcam
#!/bin/bash
#
# Add a cron job to run this script every 11 minutes.
# crontab -e
# */11 * * * * /home/YOUR_USER_NAME/script/wallpaper-gnome-grand-bornand-webcam.sh
#
USER=$(whoami)
# Le Grand-Bornand Mont Lachat de Châtillon - 2100 m
@axi
axi / wallpaper-gnome-st-malo-webcam.sh
Last active July 24, 2024 16:06
Set a wallpaper from St-malo France webcam
#!/bin/bash
#
# Add a cron job to run this script every 15 minutes.
# crontab -e
# 5,35 * * * * /home/YOUR_USER_NAME/Documents/unsplash.sh
#
USER=$(whoami)
# to find api_key, explore requests on webcam display page (for ex https://api.skaping.com//media/search and look for POST api_key)
@axi
axi / PsrLoggerWrapper.php
Created June 21, 2024 17:13
PsrLoggerWrapper for WC_Logger
<?php
use Psr\Log\LoggerInterface;
class PsrLoggerWrapper implements LoggerInterface
{
private WC_Logger_Interface $logger;
public function __construct(WC_Logger_Interface $logger = null)
{