Getting started:
Related tutorials:
| ========================================================================================================== | |
| MySQL Guide - Basics | |
| ========================================================================================================== | |
| Connect/Disconnect from MySQL Server | |
| ---------------------------------------------------------------------------------------------------------- | |
| :~ sudo mysqld_safe //Turns on MySQL server | |
| :~ mysql -h host -u root -p //Connects to MySQL server: "no need to specify host on local" | |
| mysql> quit; //Disconnects from MySQL | |
| :~ mysqladmin -u root -p shutdown //Shuts down MySQL server | |
| ---------------------------------------------------------------------------------------------------------- |
Getting started:
Related tutorials:
Convert DateTime in UnixTimeStamp
SELECT *,from_unixtime(date_added) FROM TABLE_NAME order by date_added desc
Space consume by a table
SELECT table_schema "Data Base Name",sum( data_length + index_length ) / 1024 / 1024 /1024 "Used GB" FROM information_schema.TABLES GROUP BY table_schema ;
Character Set
utf8mb4_unicode_ci
Set a login path using terminal/putty
# sudo vim /etc/mysql/conf.d/perso.cnf
[mysqld]
key_buffer_size = 128M
query_cache_limit = 2048M| Image edition | |
| # convert white color to transparency | |
| convert <image.png> -fuzz 5% -transparent white <new-image.png> | |
| # resize image to 24, 48, 64, 96 & 128 preserving ratio (width) | |
| for isize in 24 48 64 96 128 | |
| do | |
| ffmpeg -i <original-img.png> -vf scale=${isize}:-1 <image_${isize}.png> | |
| done |
| #!/usr/bin/env bash | |
| # | |
| # Install: | |
| # cp iconresize.sh ~/bin/iconresize | |
| # chmod 0700 ~/bin/iconresize | |
| # | |
| # How to use: | |
| # iconresize <filename:icon.png> <directory:android> <tool:im|ff> | |
| # |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
| # basic pfctl control | |
| # == | |
| # Related: http://www.OpenBSD.org | |
| # Last update: Tue Dec 28, 2004 | |
| # == | |
| # Note: | |
| # this document is only provided as a basic overview | |
| # for some common pfctl commands and is by no means | |
| # a replacement for the pfctl and pf manual pages. |