Skip to content

Instantly share code, notes, and snippets.

View ragusa87's full-sized avatar

Laurent Constantin ragusa87

View GitHub Profile
@ragusa87
ragusa87 / django.ipynb
Last active October 7, 2025 09:16
Python learning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ragusa87
ragusa87 / Readme.md
Last active January 24, 2022 13:13
Laravel Custom email transport for api.swisscom.com

In your config/mail.php add this:

return [ // ..
      'swisscom_mail_api' => [
            'transport' => 'swisscom_mail_api',
            'api_key_map' => [
                config("emails.from_one") => env('MAIL_MESSAGING_API_KEY_FROM_ONE'),
                config("emails.from_two") => env('MAIL_MESSAGING_API_KEY_FROM_TWO'),
 ],
@ragusa87
ragusa87 / README.md
Last active February 1, 2022 17:27
Zigbee2MQTT Memo

Zigbee2MQTT on Raspberry PI 1

Check that everything is fine in the logs:

journalctl -u zigbee2mqtt -f

@ragusa87
ragusa87 / VideoStream.php
Created November 12, 2019 21:34
Serve video via php -S
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
### Keybase proof
I hereby claim:
* I am ragusa87 on github.
* I am ragusa87 (https://keybase.io/ragusa87) on keybase.
* I have a public key ASAbz7DA36ZJeEWBRGlwuGKPvYseNlSa9B4nMZIaQLGkDQo
To claim this, I am signing this object:
@ragusa87
ragusa87 / !Wrench
Last active July 27, 2018 13:52
Wrench passbolt tool
Wrench
#!/bin/bash
#
# Create environement for development.
# docker script is inspired by https://github.com/jessfraz/dockerfiles
#
#
# 1 = docker name
@ragusa87
ragusa87 / index.php
Created May 6, 2017 11:19
Data transform "page_history" column of a CSV file
<?php
/**
* @author Laurent Constantin
* Alter the 'page_history' column of a CSV file with emotions.
* A map between page number and emotion's name is required in a csv format.
*/
class WhatDoYouDo4Love
{
/**
@ragusa87
ragusa87 / StrokeFilter.php
Created September 12, 2016 08:47
LiipImagine Stroke filter
<?php
namespace Generalmedia\AppBundle\Filter;
use Imagine\Image\ImageInterface;
use Imagine\Image\ImagineInterface;
use Imagine\Image\Palette\RGB;
use Imagine\Image\Point;
use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface;
#!/bin/bash
# Backup Mysql database staring with "__apps", compress the dump.
# Olds backup are removed if they are older than X days
# LCO 2016-06-05
# Script based on http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/
MUSER="root"
MPASS="PASSWORD-GOES-HERE"
MHOST="localhost"
MYSQL="$(which mysql)"