Blog Spot!


GIT useful hints

Built-in git GUI

  • gitk

Use colorful git output

  • git config color.ui true

Show log on just one line per commit

  • git config format.pretty oneline

Use interactive adding

  • git add -i

Added on 10.Dec.2020
Tags: git terminal

How to disable Bluetooth at startup on Linux Mint Cinnamon

SOLUTION:

  • GO TO: Start Menu -> Startup Applications
  • Click on + (Soft Button denoted by “PLUS/ADDITION/+” sign/symbol at the bottom of the “Startup Applications” window).
  • Click on "Custom command."
  • Add any name/description you like, ex "DISABLE BLUETOOTH"
  • Add Command as: rfkill block bluetooth

Article

Added on 05.Dec.2020
Tags: linux tweaks how-to mint bluetooth

How To Migrate a MySQL Database Between Two Servers

digitalocean

Step One - Perform a MySQL Dump

mysqldump -u root -p --opt [database name] > [database name].sql

Step Two - Copy the Database

scp [database name].sql [username]@[servername]:path/to/database/

Step Three - Import the Database

mysql -u root -p newdatabase < /path/to/newdatabase.sql

mysqldump & gzip, The Best Combo

Backup:

mysqldump -u username -p your_db_name | gzip -9 > your_db_name.sql.gz

Restore:

zcat your_db_name.sql.gz | mysql -u username -p your_db_name

Added on 10.Jun.2020
Tags: sql dump move migrate mysqldump

How to remove PPA

askubuntu

TL;DR

Use the --remove flag, similar to how the PPA was added:

sudo add-apt-repository --remove ppa:whatever/ppa

...

You can also remove PPAs by deleting the .list files from /etc/apt/sources.list.d directory.

Last but not least, you can also disable or remove PPAs from the "Software Sources" section in Ubuntu Settings with a few clicks of your mouse (no terminal needed).

Added on 18.Feb.2020
Tags: PPA remove ubuntu repository linux

Check for Listening Ports in Linux - Ports in use

netstat

sudo netstat -tunlp

-t - Show TCP ports.
-u - Show UDP ports.
-n - Show numerical addresses instead of resolving hosts.
-l - Show only listening ports.
-p - Show the PID and name of the listener’s process. This information is shown only if you run the command as root or sudo user.

ss

sudo ss -tunlp

ss is new netstat. It lacks some of the netstat features but exposes more TCP states and it is slightly faster.

lsof

sudo lsof -nP -iTCP -sTCP:LISTEN
# or
sudo lsof -i tcp:80 -n -P

lsof is a powerful command-line utility that provides information about files opened by processes.

-n - Do not convert port numbers to port names.
-p - Do not resolve hostnames, show numerical addresses.
-iTCP -sTCP:LISTEN - Show only network files with TCP state LISTEN.

article

Added on 10.Dec.2019
Tags: linux terminal netstat ss lsof ports tcp udp sockets

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top