Skip to content

Instantly share code, notes, and snippets.

View ayoubelmhamdi's full-sized avatar
🏠
Working from home

AYOUB EL MHAMDI ayoubelmhamdi

🏠
Working from home
View GitHub Profile
@bikcrum
bikcrum / Connect Google Colab+Drive with SSH.ipynb
Last active October 16, 2024 03:23
This is the way how can you connect google colab as well as google drive (mounted) using SSH. This is useful when you want to download data directly to your google drive specially for machine learning purpose. It can be easy to mount google drive and use files into for your code.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stancl
stancl / deploy.sh
Last active April 10, 2025 08:40
Deploy using GitHub actions and SSH to a VPS
#!/bin/sh
set -e
vendor/bin/phpunit
npm run prod
git add .
(git commit -m "Build frontend assets for deployment to production") || true
(git push) || true
@superboum
superboum / LICENCE.txt
Last active April 15, 2025 16:22
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
@Cyxo
Cyxo / live_radio.sh
Last active April 30, 2024 16:46 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
apt-get install software-properties-common
apt-get install -y gcc-multilib g++-multilib libffi-dev libffi6 libffi6-dbg python-crypto python-mox3 python-pil python-ply libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libgdbm-dev dpkg-dev quilt autotools-dev libreadline-dev libtinfo-dev libncursesw5-dev tk-dev blt-dev libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libsqlite3-dev libgpm2 mime-support netbase net-tools bzip2
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar xfz Python-2.7.9.tgz
cd Python-2.7.9/
./configure --prefix /usr/local/lib/python2.7.9 --enable-ipv6
make
make install
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
@namjoker
namjoker / stream_to_youtube.sh
Last active February 7, 2021 06:52 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://rtmp-api.facebook.com:80/rtmp/" # URL de base RTMP youtube
@JonathonReinhart
JonathonReinhart / sample_output
Created July 29, 2016 15:12
Show Ethernet drivers on Linux
$ ~/what_eth_drivers.sh
eth0 [52:54:00:aa:bb:cc]: virtio_net (up)
eth1 [52:54:00:dd:ee:ff]: virtio_net (up)
eth2 [52:54:00:99:88:77]: virtio_net (up)
lo [00:00:00:00:00:00]: (unknown)
@devsalman
devsalman / apksigner
Created March 24, 2016 06:58
Script to sign android apk using keystore
#!/bin/sh
filename=$(basename "$1")
filename=${filename%.*}
printf "Badr Interactive APK Signer V.1.0 \n"
printf "================================= \n"
if [ -z "$ANDROID_HOME" ]; then
printf "cannot find ANDROID_HOME environment variable \n"
@xCoreDev
xCoreDev / create-swap.sh
Created October 1, 2015 20:18
Create a 4GB swapfile
#!/bin/sh
# size of swapfile in megabytes
swapsize=4096
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then