Posts

Showing posts from 2020

Crontab command

 crontab -l  to see all listed crontab tasks. crontab -e to add/edit crontab tasks. Inside the crontab editor, the command would be composed of  <scheduler> <run command> <the output> * * * * * /home/ae/code.sh >> output.txt 2>&1  Which.. the 1st star = minutes to start running the 2nd star = hours to start running the 3rd star = day of the month to start running the 4th star = month to start running the 5th star = day of the week to start running More info: https://www.geeksforgeeks.org/crontab-in-linux-with-examples/  

2>&1 in command means??

References.. 0 =  standard input  ( stdin ) 1 =  standard output  ( stdout )  2 =  standard error  ( stderr ) Hence, we can use command > output.log to print the std output stream, which is an implicit meaning of command 1>output.log Thus, the annex 2>&1 means print the std error to the same place as the std output.  Moreover, the we can hide the std output from printing out by using 2>/dev/null. Thanks to: https://linuxize.com/post/bash-redirect-stderr-stdout/ Learning bash: https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial

MySQL Function: Thai months to String

 /*--------- Function: get_month ---------*/ DROP FUNCTION IF EXISTS get_month; DELIMITER $$ CREATE FUNCTION get_month(   m VARCHAR(100) ) RETURNS int(2)     DETERMINISTIC BEGIN  DECLARE me int(2) default 0;      IF m= 'ม.ค.' THEN set me= 1;     ELSEIF m= 'ก.พ.' THEN set me= 2;     ELSEIF m= 'มี.ค.' THEN set me= 3;     ELSEIF m= 'เม.ย.' THEN set me= 4;     ELSEIF m= 'พ.ค.' THEN set me= 5;     ELSEIF m= 'มิ.ย.' THEN set me= 6;     ELSEIF m= 'ก.ค.' THEN set me= 7;     ELSEIF m= 'ส.ค.' THEN set me= 8;     ELSEIF m= 'ก.ย.' THEN set me= 9;     ELSEIF m= 'ต.ค.' THEN set me= 10; ELSEIF m= 'พ.ย.' THEN set me= 11;     ELSEIF m= 'ธ.ค.' THEN set me= 12;     END IF;         RETURN me; END $$ DELIMITER ;

Prevent root-login on CentOS

1. Go to folder SSH > cd /etc/ssh 2. Edit file SSH configuration > vi sshd_config 3. Search word PermitRootLogin > /PermitRootLogin 3. Remove # and disable  PermitRootLogin > PermitRootLogin no 4. Restart SSH service > service sshd restart DONE!!😉

Recommended video screen recorder (on Window, Linux, Andriod)

On window use the program Free Cam On Linux use the program Peek sudo add-apt-repository ppa:peek-developers/stable sudo apt update sudo apt install peek or use the program VokoScreenNG sudo add-apt-repository ppa:ubuntuhandbook1/apps sudo apt update sudo apt install vokoscreen-ng On Andriod use the app XRecorder More detail for Linux: https://itsfoss.com/take-screenshot-linux/  

How different between words "Cutting-edges" and "State-of-the-art" ?

When I'm going through many of literature reviews from papers, articles, books, etc. these words confused me a bit, and here is the definition I've got. State-of-the-art : used for reference to the most modern and mature development technologies. Cutting-edges: used for reference to the best solutions but still in developing. Hope this could help you, see ya :)

Ruby on Rails with PosgreSQL : Basic tutorial

Installation Steps - Install Ubuntu and upgrade - Install Apache2 - Install Rails - Install Ruby - Install Passenger More Info:  https://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger Command Guides * To install Apache 2 development headers: sudo apt-get install apache2-dev * To install Ruby development headers: sudo apt-get install ruby-dev * To in stall Passenger gem install passenger passenger-install-apache2-module * To install Apache Portable Runtime (APR) development headers: sudo apt-get install libapr1-dev * To install Apache Portable Runtime Utility (APU) development headers: sudo apt-get install libaprutil1-dev * To install Curl development headers with SSL support: sudo apt-get install libcurl4-openssl-dev (or libcurl4-gnutls-dev) ------------ Set c onfig passenger ----------- LoadModule passenger_module /home/web05/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/passenger-5.3.4/buildout/apache2/mod_passenger.so

Using Git: Cheat sheet

This summary is not available. Please click here to view the post.

Multi-dimensional Data Warehouse Schema

Dimension Tables = A table contains information about an object such as customers, products, sellers, date_time. As its nature, each set of data has more than one dimension. Fact Tables = A table contains a measurement data such as orders; thus, an order combines information of customer, product, seller, date_time, branch, etc. The fact data will be used for measurement in that data mart or data warehouse. It can be one or more fact tables in a data warehouse. Multi-dimensional = more than one dimension tables. Thus, Multi-dimensional Schemas have 3 types as follow: Star-Schema = The fact table contains FK of dimension tables while each dimension table contain complete attributes of its dimension (has no join to other tables) Snow-Flake Schema = The fact table contains FK of dimension tables while the dimension tables itself might contain FK of other dimension tables as a hierarchy. Galaxy Schema or Family of star Schema = There're more than one fact tables which s

Time Management Tips

In one's life, there might not face a big golden chance that could make up life to the perfect success. Successful needs clear goals, good plans, and devoting himself. I've heard lots of tricks to manage our time, tasks, and mindset to archive goals. Here's where I will share what I've heard from psychiatrists and influencers. ⦿ 3-Seconds of Decision Making  Whenever you're thinking to start/do a valuable thing or not, spend your time only 3 seconds to make the decision, else you'll never start or achieve it due to your fear will create many reasons for not doing. Else, you'll never do it! Credit: Dr. Jing (student of psychiatrist) (Thai)  https://www.youtube.com/watch?v=PHHFlIp2noY ⦿ Morning Miracle - Before 8.00 AM Waking up early before 8.00 AM is capable to transform your life as follows. this behavior increases your energy and productivity by the freshness reduces your strain competitive to all of your challenges get better health and shap

Guideline: How to write the thesis report

The following tips came from my personal experience during writing my master thesis report. I hope this could help friends to start your research/thesis on the right track and reduce your time to manage it. Any suggestions are welcome as well. Where should I start? Select your interesting area, it's highly recommended to focus on your future career life.  Think about the situation and problems existing in that area, this will lead to your research/thesis topics. Go to more information on google/youtube/teds any platform that could give you the reality of the current situation of that topic area (spend your time serving for 2-3 days if possible, so you will see a clearer picture of what you're interested in). Focus on only one important problem as your topic, which you will give your contribution to solving. Before start writing? Think about the topics related to your thesis background, problem statements, and potential solutions. List those topics in the hierarchy

4 Types of NoSQL Databases

NoSQL databases (aka " not only SQL ") are non-tabular, and store data differently than relational tables. NoSQL databases come in a variety of types based on their data model. The main types are document, key-value, wide-column, and graph. They provide flexible schemas and scale easily with large amounts of data and high user loads. 4 major types of NoSQL databases emerged: Document databases  Store data in documents similar to JSON (JavaScript Object Notation) objects.  Each document contains pairs of fields and values.  The values can typically be a variety of types including things like strings, numbers, booleans, arrays, or objects Their structures typically align with objects developers are working within code.  A powerful query languages Horizontally scale-out to accommodate large data volumes.  MongoDB is consistently ranked as the world’s most popular NoSQL database according to DB-engines and is an example of a document database. Key-value database

What is the differrent between grid computing and distributed computing?

Image
The difference between Grid Computing and Distributed Computing is that: Grid Computing uses different machines with different resource managers (on each own) running for a same project.  Distributed Computing uses different machines (nodes) running with a centralized resource manager for a project Reference:  The answer from  https://www.researchgate.net/post/What_is_the_difference_between_grid_computing_systems_and_distributed_systems More details see  http://www.jatit.org/distributed-computing/grid-vs-distributed.htm Example of Grid Computing database Oracle 10g Reference: https://www.oracle.com/technetwork/database/bi-datawarehousing/twp-parallel-execution-fundamentals-133639.pdf Learning Oracle Parallel Processing https://www.oreilly.com/library/view/oracle-parallel-processing/156592701X/ch04.html https://docs.oracle.com/en/database/oracle/oracle-database/12.2/vldbg/parallel-exec-intro.html Example of Distributed Database RxDB ReThink Apache Cassa

APA Citations

Image
In education research/thesis, some institute need the APA style of references and citations. These are examples of how to write it. Free citation go to  https://citation.crosscite.org/ Cite by searching name or manual citation go to  https://www.citationmachine.net/items/new  ** includes details for in-text references Journal Example: Khan, F. A., Ahmad, A., Imran, M., Alharbi, M., Mujeeb-ur-rehman, & Jan, B. (2017). Efficient data access and performance improvement model for virtual data warehouse. Sustainable Cities and Society, 35, 232–240. https://doi.org/10.1016/j.scs.2017.08.003 Book Author, A. (Year). Title of chapter. In Editor (Edition), Title of book (pp. xxx–xxx). Location: Publisher. E-Book  Author, A., and Author, B.(year of publication). Title of e-book: Subtitle . Publisher (Edition). doi:xxx Author, A., and Author, B.(year of publication). Title of e-book: Subtitle . Publisher (Edition). Retrived from http://xxx Example: Dull, T. A Non-Geek’s Bi

Types of SQL Command

Image
DDL = Data Definition  Language - specify table definitions DML =  Data Manipulation Language - works with data DCL = Data Control Language - who has access rights TCL = Transaction Control  Language - how the transaction will be Reference:  https://www.w3schools.in/mysql/ddl-dml-dcl/

What is Radius in telecommunication domain?

RADIUS stands for Remote Authentication Dial-In User Service  it is a client/server security protocol used for control user authentication used for monitoring and control user profiles such as service package, speed, user groups, IP, session time records internet user accounting - session time, connection start/stop, bandwidth usage included the reason for connection ending used for real-time controlling online users - clear session, restrict authentication the clients will connect to the Network Access Server (NAS) as medium server for authentication instead of directly communicating with the RADIUS  Reference: More information  (Thai)  https://sites.google.com/site/onchitarokm/mmm

Facebook posts to Wordpress

Image
Go to Wordpress control Click on Automatical tab New Campeign > Facebook  Check the video below to see more 5 easy ways to integrate these two technologies on your own page as an expert. Try it on your Wordpress now!  https://wordpress.com/

Where should I start to be a great/expert front-end developer?

Image
Hi, dude. Here is a great and easy understand video of what should we learn for front-end developer. Check the list and start a practice of each point to prepare yourself from now!

Get One Drive Free 5 GB for all platforms!

Image
One Drive is free online storage provided by Microsoft Free Basic 5 GB for personal use Compatible work on all Platform (iOS, Andriod, Mac, Window, Linux) No installation required and works great on any web browser! (IE, Chrome, Safari, Firefox) Once registration get Free office 365! Web browser version Go for the free plan  now!  https://onedrive.live.com/about/th-th/plans/  It has no bug! You'll enjoy it :) (6 Apr. 2020) More price plans are included in the link.

What is Microsoft Teams?

Image
Microsoft Teams is a communication, files and screen sharing which is designed to work in full-compatible with Office 365.  It has the following noteworthy features: runs on any platform includes Window 8.1+, Mac10.10+, Linux, iOS, Andriod, and browsers (e.g. IE, Chrom, Firefox, Safari) no meeting time limit  records and stream your meeting max files sharing  up to 15GB per file full team collaboration on office files like Words, Excel, PowerPoint up to 100 concurrent users There are "Concepts" tab feature for support separated topics "Conversations" and "Files" tab are separated for easy search your past work Suitable for internal learning, education and external invitation and share meeting by a URL  It's popular to 44 million of online users per day during a critical situation of COVID-19 Reference: (Thai ) https://medium.com/@mosnoppadolr/microsoft-teams-1-คืออะไร-ดียังไง-ทำไมต้องสนใจ-teams-fb8380fae2d6 See video: (Thai)