Below you will find pages that utilize the taxonomy term “2017”
Blog
Tags Cloud Sorted by Post Count for Jekyll Blogs without Plugins
Recently, I have been trying to transfer my old posts in a Blogger blog to my new Jekyll blog since I really liked this way of blogging. But there were some features that I like in Blogger and wasn’t supported in Jekyll by default. I did some research and found a very nice way of generating tags cloud the my blog.
Although I build my blog locally and then push to GitHub pages, I still try not to use a custom plugin.
Blog
How to Generate Database EER Diagrams from SQL Scripts using MySQL Workbench
MySQL Workbench makes it really easy to generate EER diagrams from SQL scripts. Follow below steps to make one for yourself.
Download and install MySQL Workbench for your system.
See below simple SQL commands, later I’ll use them to generate a sample diagram.
1create table country ( 2 id integer primary key, 3 name CHAR(55)); 4 5create table city ( 6 id integer primary key, 7 country_id integer, 8 name CHAR(55), 9 foreign key (country_id) references country(id)); Open MySQL Workbench and create a new model (File -> New Model).
Blog
Get Size of MySQL Databases
Use below query in MySQL command prompt to get a table of databases and their sizes in MB.
SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;
Blog
Replace Entire Column with a Number in Bash
Use below awk one-liner to replace all values in a column (5th column in example) with a value (1 in example).
awk "{$5=1} {print}" filename > filename.replaced
Blog
Make a Shortcut for SSH Connections
It could be really annoying to reenter the host name again and again if you are working over ssh and the host name is really long (i.e. mistral.ii.metu.edu.tr). Using this method, you can set a shorcut for the host name (i.e. mistral) and use it whenever you connect.
Open ~/.ssh/config for editing:
subl ~/.ssh/config Add your host definition as follows:
Host mistral HostName mistral.ii.metu.edu.tr User gbudak
Blog
Passwordless SSH for Mac/Linux
You don’t have to enter the ssh password everytime you make a connection. Use below method to generate a key, copy it to the host you want to connect and connect anytime without entering your password.
Generate a keygen:
1ssh-keygen Copy the key to remote host:
1ssh-copy-id root@linuxconfig.org