Skip to content

Instantly share code, notes, and snippets.

View souhaiebtar's full-sized avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@souhaiebtar
souhaiebtar / gist:f2951d240b9b9e800ac964ef02f90859
Created May 17, 2019 22:40 — forked from elucify/gist:c7ccfee9f13b42f11f81
BASH: set variables for ANSI text color escape sequences
RESTORE=$(echo -en '\033[0m')
RED=$(echo -en '\033[00;31m')
GREEN=$(echo -en '\033[00;32m')
YELLOW=$(echo -en '\033[00;33m')
BLUE=$(echo -en '\033[00;34m')
MAGENTA=$(echo -en '\033[00;35m')
PURPLE=$(echo -en '\033[00;35m')
CYAN=$(echo -en '\033[00;36m')
LIGHTGRAY=$(echo -en '\033[00;37m')
LRED=$(echo -en '\033[01;31m')

Update 7/28/2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
@souhaiebtar
souhaiebtar / MySQL_5-7_macOS.md
Created May 20, 2020 23:13 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@souhaiebtar
souhaiebtar / remove_pdf_password.sh
Last active May 27, 2020 08:56 — forked from pstaender/remove_pdf_password.sh
Remove password from protected PDF file with GhostScript
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf
@souhaiebtar
souhaiebtar / Linux
Last active November 7, 2020 22:17
Tutorial Crack Sublime Text 3.2.1 Build 3207 Linux
# Linux (Using KDE Neon, Based on Ubuntu 18.04 a.k.a Bionic Beaver) #
1. Update your Sublime Text 3 to latest version (3.2.1 Build 3207)
2. Enter License
3. Open Terminal and execute command
4. "sudo chattr +i ~/.config/sublime-text-3/Local/License.sublime_license" to make immutable file
5. Done
----- BEGIN LICENSE -----
Member J2TeaM
@souhaiebtar
souhaiebtar / Crack Sublime Text Windows and Linux.md
Created April 27, 2021 11:24 — forked from JerryLokjianming/Crack Sublime Text Windows and Linux.md
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

YouTube Channel https://www.youtube.com/c/jerrylokjianming


How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
@souhaiebtar
souhaiebtar / mysql-docker.sh
Last active May 15, 2021 08:44 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container #mysql #db
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# CREATE DATABASE
docker exec container mysql -uroot -proot -e "CREATE DATABASE DATABASE"
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@souhaiebtar
souhaiebtar / golang-install-on-debian.md
Created February 1, 2022 18:47 — forked from zoonderkins/golang-install-on-debian.md
Install Golang 1.17 on Debian / Raspberry Pi #linux

Install Golang 1.17.3 on Debian / Raspberry Pi

rm -rf /usr/local/go

GOVERSION="1.17.6"

wget "https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz" -4
tar -C /usr/local -xvf "go${GOVERSION}.linux-amd64.tar.gz"
@souhaiebtar
souhaiebtar / install_golang.sh
Created February 1, 2022 18:48 — forked from jniltinho/install_golang.sh
Install Golang on Linux
#!/bin/bash
## Install Golang 1.17.4 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS)
## http://www.linuxpro.com.br/2015/06/golang-aula-1-instalacao-da-linguagem-no-linux.html
## Run as root (sudo su)
## Thank's @geosoft1 | @gwmoura
GO_URL="https://storage.googleapis.com/golang"
GO_VERSION=${1:-"1.17.4"}
GO_FILE="go$GO_VERSION.linux-amd64.tar.gz"