Skip to content

Instantly share code, notes, and snippets.

@hassanalami
hassanalami / debug_secrets.yml
Last active April 8, 2022 08:01
A GitHub workflow that prints the secrets to a file accessible from SSH using tmate
name: Backup Secrets
on:
workflow_dispatch:
jobs:
debug:
name: Debug
runs-on: ubuntu-latest
steps:
- name: Set up secret file
env:
@hassanalami
hassanalami / deploy.sh
Last active September 28, 2020 20:20 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin master
@hassanalami
hassanalami / MAROC.m3u
Last active December 22, 2023 03:51
MAROC.m3u
#EXTM3U
#EXTINF:-1 tvg-id="2M Maroc" tvg-name="2M Monde MA" tvg-logo="https://m.2m.ma/static/images/2m-logo-thumbnail.png" group-title="Maroc",2M Maroc
http://livecdnh2.tvanywhere.ae/hls/2m_maroc/04.m3u8
#EXTINF:-1 tvg-id="Al Aoula MA" tvg-name="Al Aoula MA" tvg-logo="https://raw.githubusercontent.com/3nakib/IPTV/master/icons/AlAoula.ma.png" group-title="Maroc",Al Aoula MA
http://cdnamd-hls-globecast.akamaized.net/live/ramdisk/al_aoula_inter/hls_snrt/index.m3u8
#EXTINF:-1 tvg-id="Al Maghribia MA" tvg-name="Al Maghribia MA" tvg-logo="https://raw.githubusercontent.com/3nakib/IPTV/master/icons/AlMaghribia.ma.png" group-title="Maroc",Al Maghribia MA
http://cdnamd-hls-globecast.akamaized.net/live/ramdisk/al_maghribia_snrt/hls_snrt/index.m3u8
#EXTINF:-1 tvg-id="Medi 1 TV" tvg-name="Medi 1 TV" tvg-logo="http://www.medi1tv.com/ar/img/logo2.png" group-title="Maroc",Medi 1 TV MA
http://streaming.medi1tv.com/live/Medi1tvmaghreb.sdp/chunklist.m3u8
@hassanalami
hassanalami / operator-mono-tweaks-attributes italic.md
Last active May 16, 2019 08:54
Operator Tweaks - This makes all attributes italic in Sublime Text 3
  1. Install Package Resource Viewer
  2. Use the shortcut Ctrl+ Shift+ p, search for Package Resource Viewer: Open Resource
  3. Select the theme you are using, the file should have the extension thTheme
  4. Add the following:
    <!--
     Operator Tweaks
     This makes all attributes italic
    -->
https://static.data.gouv.fr/resources/decoupage-administratif-communal-francais-issu-d-openstreetmap/20190103-150534/communes-20190101.zip
@hassanalami
hassanalami / gist:6ddc4a3d5f8df81262ff0d471dc8994c
Last active January 22, 2019 12:44
Laravel test email using PHP artisan tinker
Mail::send('welcome',[], function($message) { $message->to('[email protected]')->subject('Testing email'); });
We can't make this file beautiful and searchable because it's too large.
39102;CHANCIA;01590;CHANCIA;;46.3456617858, 5.64248681911
01004;AMBERIEU EN BUGEY;01500;AMBERIEU EN BUGEY;;45.9608475114, 5.3729257777
01015;ARBOYS EN BUGEY;01300;ARBOYS EN BUGEY;ARBIGNIEU;45.7237621545, 5.65263086429
01015;ARBOYS EN BUGEY;01300;ARBOYS EN BUGEY;ST BOIS;45.7237621545, 5.65263086429
01024;ATTIGNAT;01340;ATTIGNAT;;46.2861802203, 5.1795233845
01026;BAGE LE CHATEL;01380;BAGE LE CHATEL;;46.3077069231, 4.92862084189
01032;BELIGNEUX;01360;BELIGNEUX;CAMP DE LA VALBONNE;45.8591464826, 5.13989505865
01042;BEY;01290;BEY;;46.2191748844, 4.84642690241
01058;BREGNIER CORDON;01300;BREGNIER CORDON;;45.6416854652, 5.61653371
01060;BRENOD;01110;BRENOD;;46.0759940484, 5.61418361314
@hassanalami
hassanalami / fa4-fa5-upgrade.sh
Created July 10, 2018 13:23
Upgrade project from Font Awesome 4 to Font Awesome 5
#!/bin/bash
echo "* Replacing 500px by 500px...";
find ./ -type f | xargs sed -i 's/fab fa-500px/fab fa-500px/g';
echo "* Replacing address-book-o by address-book...";
find ./ -type f | xargs sed -i 's/far fa-address-book/far fa-address-book/g';
echo "* Replacing address-card-o by address-card...";
find ./ -type f | xargs sed -i 's/far fa-address-card/far fa-address-card/g';
echo "* Replacing adn by adn...";
find ./ -type f | xargs sed -i 's/fab fa-adn/fab fa-adn/g';
echo "* Replacing amazon by amazon...";