Skip to content

Instantly share code, notes, and snippets.

View mrkrash's full-sized avatar

Mario Ravalli mrkrash

View GitHub Profile
mrkrash / Caddyfile
Created April 30, 2024 14:11
Caddy configuration for prestashop - rewrite rules
log {
output stdout
format console
level DEBUG
supervisor {
php-fpm {
restart_policy always
redirect_stdout stdout
mrkrash / 6ktlm-g3.yaml
Created October 13, 2023 08:17 — forked from gushcs/6ktlm-g3.yaml
solarman inverter definition for SOFAR KTLM G3 to be used with HomeAssistant Solarman integration
#Ps. only "Alert sensor" not working
# Sofar 3.3-12KTLM-G3
# Note: no modbus energy meter connected
- start: 0x0400
end: 0x042E
mb_functioncode: 0x03
- start: 0x0480
mrkrash / LimitedErrorActivationStrategy.php
Created August 8, 2023 09:38 — forked from simshaun/LimitedErrorActivationStrategy.php
Monolog activation strategy to ignore 403, 404, and 405 errors
namespace Acme\Monolog;
use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
use Symfony\Component\HttpKernel\Exception\HttpException;
class LimitedErrorActivationStrategy extends ErrorLevelActivationStrategy
public function __construct()
mrkrash / sane-caching.nginx.conf
Created June 27, 2023 23:06 — forked from philipstanislaus/sane-caching.nginx.conf
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
mrkrash / gist:6040474be6d7accbd59bf2b2eefce682
Created November 18, 2022 08:43
Raspberry Thinclient Project

RpiTC has moved away but, if you search default username & password, there are:

  • ssh -> rpitc/rpitc (also as root with su -);
  • vnc -> rpitc
mrkrash / ActivityDownload.kt
Last active December 3, 2021 16:42
Use Android Volley for download file from server
* This is only a snip code
* Function that use VolleyFileDownloadRequest on a singletone
fun download(url: String, callback: VolleyByteArrayCallback) {
Log.d(TAG, "Download File from Server")
val volleyFileDownloadRequest = object : VolleyFileDownloadRequest(