Skip to content

Instantly share code, notes, and snippets.

Avatar
🥑
FR E SH A VOCA DO

Mansour Yaacoubi mansouryaacoubi

🥑
FR E SH A VOCA DO
View GitHub Profile
@mansouryaacoubi
mansouryaacoubi / Readme.md
Last active Aug 5, 2022
Duck DNS DNS Settings
View Readme.md

Guide How To use custom domain with Duck DNS: home-assistant/addons#1331 (comment)

Let us imagine the following:

You have a domain example.duckdns.org and you have the domain example.com and want to access your home assistant via home.example.com.

Short Guide

  1. Set CNAME records for your domain: *.home and home pointing to example.duckdns.org
  2. Install or Reinstall the DuckDNS Addon on your home assistant instance.
  3. Set your addon config and leave out your alias for this step
@mansouryaacoubi
mansouryaacoubi / saveAndPrint.vbs
Created Jun 2, 2020
Save and Print Excel Data for BCP
View saveAndPrint.vbs
' Author: Mansour Yaacoubi
' Timestamp: 2020-06-02 13:00 UTC+0
' Summary: This script deals with the
' document of the BCP and automates
' tasks for the employees
' Responsible: Mohammed Ngadi
Sub Button1_Click()
' TODO: Check previously if empty before printing
@mansouryaacoubi
mansouryaacoubi / grammarcheck.sh
Last active Jan 10, 2022
Duden Grammar-Check using unofficial Mentor-API (Grammatik, Rechtschreibung)
View grammarcheck.sh
#!/bin/sh
curl 'https://mentor.duden.de/api/grammarcheck?_format=json' -H 'content-type: application/json' --data-binary '{"text":"Bitte geben Sie die nächste zu zuweisende sendung ein."}' --compressed
@mansouryaacoubi
mansouryaacoubi / README.md
Last active Feb 4, 2019
Laravel 5.5 + React + Bootstrap 4
View README.md
composer create-project laravel/laravel="5.5.*" tasksman
cd tasksman
php artisan preset react
@mansouryaacoubi
mansouryaacoubi / README.md
Created Jan 30, 2019
Login into server via ssh without server
View README.md

First create private-public key pairs

ssh-keygen -t rsa

Then create .ssh directory on remote computer

ssh user@remote.com mkdir -p .ssh
@mansouryaacoubi
mansouryaacoubi / .htaccess
Created Jan 24, 2019
.htaccess file for Laravel Projects
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
@mansouryaacoubi
mansouryaacoubi / README.md
Last active Nov 8, 2021
Change ID3 Info and Rename Files (MP3)
View README.md

Usage

Just copy your project folder into your music-directory and execute the following:

Once:

composer install

Everytime you want to rename mp3s:

@mansouryaacoubi
mansouryaacoubi / SimpleMail.php
Last active Jan 8, 2019
Send Mails in PHP using the settings in the INI file
View SimpleMail.php
<?php
class SimpleMail {
public static function send($to, $subject, $message)
{
if( is_array($to) ) $to = implode(', ', $to);
$from = 'Max Mustermann <max@mustermann.com>';
$noreply = 'noreply@mustermann.com';
// To send HTML mail, the Content-type header must be set
$headers = "MIME-Version: 1.0" . PHP_EOL;
@mansouryaacoubi
mansouryaacoubi / thumbnail.html
Last active Jan 2, 2019
Get Thumbnail for Website
View thumbnail.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Thumbnail Tester</title>
</head>
<body>
<img src="https://mxtoolbox.com/Public/ThumbnailHandler.aspx?url=https://yaacoubi.com" />
</body>
</html>