Posts

Featured Article

Quickly Load Very Large Data Sets into Your MariaDB Database

If you're using the cPanel and pasting a bunch of insert queries, then you could save a lot of time using the LOAD DATA command. In this example here, I connected via `ssh` to my server and uploaded all of the world's postal codes from opendatasoft into a database table. johnny@server [~/postal-code-data]# mysql -user=db_user -password=DB-pwd Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 29899 Server version: 10.2.31-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> use xyz_db Database changed MariaDB [xyz_db]> LOAD DATA LOCAL INFILE 'geonames-postal-code.csv' >INTO table geo_postal_codes fields terminated by ';'; Query OK, 1433484 rows affected, 65535 warnings (1 min 2.79 sec) Records: 1433484 Deleted: 0 Skipped: 0 Warnings: 5733970

Do you want a professional favicon for every browser?

Image
Of course you do! But, today, favicons are ridiculously complex. There are so many options and so many devices to consider and making your icon look professional on every device can be very time consuming. I spent hours trying to get mine just right... For you to get flawless perfection, you're making a large time investment. But, there's another way which I'll get to... So, what is it that you need to consider? There's these components: The historical favicon.ico which you need and can just place in your root website directory and be done with it. But, that looks awful everywhere except on the tabs of a desktop browser. A very large number of each of the different resolutions for many different browsers, tablets, smartphones and other devices to create. A manifest configuration file that defines each of the images that you create for every device. A browserconfig.xml file to configure. meta and link tags (many, not just one) to add to the head html .

Configurable Recursive Purge and Retain Data Tool

In this article we'll discuss and demonstrate a very helpful tool for doing a recursive search through directories from a given root directory and all of its children. In this case, the application will decide whether a file should be deleted or retained. It can, through a property file, have different retention policies (i.e. number of days old for a given a path). At the end of this article, there is a link from which you can clone the repository and freely use and modify. C onfigurable H I erachrical R etention and P urge D ata Tool ( chirpd ) This tool consists of: A Bash script - This executes the java jar: chirp-data-tool.jar Three Java Classes - The java classes are the main part of this tool The three Java Classes include: ChirpData - This class is the main class and handles the major processing ChirpDataLogger - Handles logging messages ChirpDataException - The throwable Exception class Now will explain the flow of this tool: The chirpd comma

How to Fix WARNING: REMOTE HOST IDENTIFICATION HAS CHANGE - Host key verification failed.

When you get this message when you don't worry, it's easy to fix! If you re-install on OS on Unix, or your Server's IP Address changed (other reasons as well), you can get this error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:yHWwywI7mqeEG6sztr4zfr86Pjt2PyIZrfROtmbutEwqCQ. Please contact your system administrator. Add correct host key in /Users/keith/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/keith/.ssh/known_hosts:3 ECDSA host key for [4.62.0.2]:7822 has changed and you have requested strict checking. Host key verification failed. Fix by issuing this

Quick Tutorial on Writing a Linux/Unix Bash Script

Getting used to bash is a bit awkward when you come from a background of a verbose programming language (i.e Java , which I love by the way). But,if you do it awhile you get accustomed quickly. On the other hand, if you don't need to write scripts much, remembering the syntax is frustrating. This is a quick tutorial and cheat sheet that I hope you find useful. Even a Java Programmer needs to write Bash scripts sometimes. Start of Script Line one contains the location of your bash command proceeded with !# as shown here: !#/bin/bash Variable Assignments Name variables starting with a-z, A-Z. a-z, A-Z, 0-9 and _ (underscore). Do not put spaces between the variable name and assignment. Valid variables and assigment statements: myVar=1 MyVar="X" my_var="John" Referencing Assigned Variables When referencing assigned variable, precede the variable name with a $ sign and wrap variable in quotes. Example: if [ "$myVar" == "X"

How to Customize Login Message in Linux with System Status Info

Changing the login message for your Linux Server is very useful in many ways. You can display many things that are helpful to someone who is logging in for the first time or users that have logged in many times and login frequently. In this post, I'll show you how to change the login message to show some very useful information (Specifically for CentOS 7, will vary by flavor of Linux). For example, you could include things like: Environment (Production, Staging, etc) Description (What the server does) Classification (What is the level of clearance needed on the server) Server Name (What Server you logged into) Script Name (What script contains the log information, in case you have access and want to change it.) Notify (Who to notify regarding this server)(/li) Disk Space (How much disk space you have (i.e. Remaining, Total, etc) CPU Usage (How busy has the CPU been over a given period of time) Memory Used (How much memory is currently being used) Swap Space (How much over

How to Create a Symbolic Link in Unix (aka Shortcut)

ln -s sourced_from sym_link A symbolic link, also termed a soft link, is a special kind of file that points to another file, much like a shortcut in Windows or a Macintosh alias. Unlike a hard link, a symbolic link does not contain the data in the target file. It simply points to another entry somewhere in the file system. This difference gives symbolic links certain qualities that hard links do not have, such as the ability to link to directories, or to files on remote computers networked through NFS. Also, when you delete a target file, symbolic links to that file become unusable, whereas hard links preserve the contents of the file. To create a symbolic link in Unix, at the Unix prompt, enter: ln -s sourced_from sym_link sourced_from is the file or folder sym_link is name of the name of the symbolic link (aka shorcut) you want to create Replace sourced_from with the name of the existing file or path for which you want to create the symbolic link (this file can be any exist