Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@souhaiebtar
souhaiebtar / Vagrantfile.ru
Created Dec 17, 2020
[vagrantfile debian with bridged network and nested virtualization] vagrantfile debian with bridged network and nested virtualization #vagrant #virtualization
View Vagrantfile.ru
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@souhaiebtar
souhaiebtar / pre-commit
Last active Dec 10, 2020
[pre-commit git hook for DB] pre-commit git hook for DB #git #hooks #linux
View pre-commit
#!/usr/bin/env bash
git --work-tree=../ --git-dir=../.git
now=$(date -Is)
cd ../laradock
docker-compose exec -T mysql mysqldump -u root --password=root project_db > ../public/DB/PROJECT-NAME_$now.sql
cd ../public
git add DB/PROJECT-NAME_$now.sql
exit 0
@souhaiebtar
souhaiebtar / command.sh
Created Nov 27, 2020
[remove empty line using CLI] removing empty line using CLI #unix #sed #removeLine
View command.sh
sed -i '/^$/d' FILE.txt
@souhaiebtar
souhaiebtar / install_and_configure_sendmail_in_ubuntu.sh
Created Nov 25, 2020
[configure sendmail on ubuntu to enable sending email] configure sendmail in ubuntu #mail #ubuntu
View install_and_configure_sendmail_in_ubuntu.sh
### RUN
apt install --no-install-recommends sendmail-bin mailutils
mkdir -m 700 /etc/mail/authinfo
### --- START
vim /etc/mail/authinfo/gmail-smtp-auth
## add this to file
AuthInfo: "U:root" "I:USER@gmail.com" "P:GMAIL_USER_PASSWORD"
@souhaiebtar
souhaiebtar / 404.html
Created Nov 24, 2020
[404.html] 404.html #html #redirect
View 404.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body, html {
height: 100%;
margin: 0;
font: 400 15px/1.8 "Lato", sans-serif;
color: #777;
@souhaiebtar
souhaiebtar / command.sh
Created Nov 18, 2020
[clean up efi bootloader on linux] clean up efi bootloader on linux #EFI #linux
View command.sh
# lists entries
efibootmgr -v
# remove entry number 2
efibootmgr -b 0002 -B
@souhaiebtar
souhaiebtar / php.ini
Last active Nov 18, 2020
[disable showing error and warning in php] disable showing error and warning in php #php #errors
View php.ini
; add those lines to php.ini file, you can find it's location using command `php --ini | grep -i php.ini`
; if you are using ondrej/php repo, you should add it to /etc/php/7.*/fpm/php.ini
error_reporting = E_ALL & ~E_NOTICE
error_reporting = E_ALL & ~E_NOTICE | E_STRICT
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ER… _ERROR
error_reporting = E_ALL & ~E_NOTICE
@souhaiebtar
souhaiebtar / diable_snaps.sh
Created Nov 12, 2020
[disable snap in ubuntu] disable snaps in ubuntu #ubuntu #snap
View diable_snaps.sh
snap list
## than remove every package
sudo umount /snap/core/xxxx # replace xxx
sudo umount /var/snap
sudo apt purge snapd
rm -rf ~/snap
@souhaiebtar
souhaiebtar / immutable_file.sh
Last active Nov 9, 2020
[stop removing file by making file immutable] stop removing file #linux #delete #immutable
View immutable_file.sh
chattr +i file.desktop
@souhaiebtar
souhaiebtar / install_dependency.md
Created Nov 7, 2020
[install dependency needed to compile sushi, vala-lint, sequeler, eddy, clipper on ubuntu 2010] install dependency needed to compile sushi, vala-lint, sequeler, eddy, clipper on ubuntu 2010 #ubuntu #dependency
View install_dependency.md

sudo apt-get install gnome-shell-extension-prefs curl vim tmux zsh chrome-gnome-shell

sudo apt install --no-install-recommends meson libevince-dev gir1.2-gstreamer-1.0 librust-gstreamer-audio-sys-dev librust-gstreamer-audio-sys-dev libgtksourceview-4-dev libmusicbrainz5-dev libwebkit2gtk-4.0-dev libgirepository1.0-dev ninja-build ### needed for compiling gnome-sushi because there is a bug in version shipped with ubuntu 2010

sudo apt install valac libgranite-dev libpackagekit-glib2-dev libunity-dev sudo apt install --no-install-recommends valac libgranite-dev libpackagekit-glib2-dev libunity-dev sudo apt-get install --no-install-recommends build-essential sudo apt-get install libgee-0.8-dev sudo apt-get install libgda-5.0-dev sudo apt-get install libssh2-1-dev