- 5G — 5G is the fifth generation wireless technology for digital cellular networks that began wide deployment in 2019. As with previous standards, the covered areas are divided into regions called "cells", serviced by individual antennas.
- Apache HTTP server
- Apache Module mod_proxy_balancer
- Enable CORS in httpd.conf — Due to security reason, some platform does not allow to access files on apache web server that is super great feature in order not to make server in-stable, but some device having no domain connection may have no solution when requiring in communicating with such kind of servers. To resolve that issue, you will need to enable CORS in httpd.conf
- When VirtualHost does not work in Apache 2.2 — If you wanted to use VirtualHost, but it shows Testing 123... only, you should check your server configuration. You cam simply check your server if configuration works or not by httpd -S
- Apache Spark — Apache Spark is an open-source distributed general-purpose cluster-computing framework.
- Asuswrt Merlin Wifi Router — Asuswrt-Merlin is an enhanced version of Asuswrt, the firmware used by Asus's modern wifi routers. It is a third party alternative firmware for Asus routers, with a special emphasis on tweaks and fixes rather than radical changes or collecting as many features as possible.
- How to add cron job on Asuswrt Merlin Wifi Router — cru enables you to check/add/delete cron job on your Asuswrt Merline Wifi Router. Because Asuswrt does not save all the cron job by the limited storage, you should add cron job at /jfss/scripts/init-start, so the cronjob will be done as designed.
- AutoHotkey - open-source custom scripting language a.k.a. RPA tool for Microsoft Windows — AutoHotkey is a free, open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allows users of most levels of computer skill to automate repetitive tasks in any Windows application.
- AutoML — Automated Machine Learning provides methods and processes to make Machine Learning available for non-Machine Learning experts, to improve efficiency of Machine Learning and to accelerate research on Machine Learning.
- AVOD — AVOD stands for Advertising-based Video On Demand. Unlike SVOD(Subscription VOD) and TVOD(Transactional VOD), AVOD is free to consumers. However, much like broadcast television, consumers need to sit thorugh advertisements. You can see AVOD in action when watching DailyMotion, YouTube and 4OD, where ad revenue is to offset production and hosting costs.
- AWS
- AWS (Amazon Web Service) — ...
- bash — GNU Bash or simply Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been used widely as the default login shell for most Linux distributions and Apple's macOS Mojave and earlier versions.
- reboot_if_ping_does_not_work — Sometimes servers need to update its status or reboot by the condition to return its status to the best working environment to remove junk process or something like that. You can check that status by shell script.
- sed - replacing a string in a text file on bash — "sed" provides a method for searching-and-replacing a text in a specified file in bash, so you can make some scripts which can replace necessary things easily.
- Tail - useful when debug/monitor based on log file on Linux
- tee - append to a file using the tee command — tee is a command-line utility in Linux that reads from the standard input and writes to both standard output and one or more files at the same time.
- The default bash scripts useful on CentOS server
- Thread implementation in shell script — When you execute a Bash script, it will at maximum use a single CPU thread, unless you start subshells/threads. If your machine has at least two CPU threads, you will be able to max-out CPU resources using multi-threaded scripting in Bash. The reason for this is simple; as soon as a secondary ‘thread’ (read: subshell) is started, then that subsequent thread can (and often will) use a different CPU thread.
- C++
- CDN — A content delivery network, or content distribution network, is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially relative to end users
- CDN77 — CDN77 provides relatively cheaper and good CDN service for global market. It covers not only North America and Europe, but also Asian countries like Korea and Hong Kong. If you are considering global content distribution to North America and Euope, CDN77 is a pretty much good option.
- INXY — Price: USD 1.99 per 1TB = 0.00019 per 1GB
- CentOS 7 — CentOS 7 is a Linux distribution that provides a free, enterprise-class, community-supported computing platform functionally compatible with its upstream source, Red Hat Enterprise Linux
- CentOS warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory on CentOS 7 — If you faced an error "cannot change locale (UTF-8)", it can be simply solved to add following lines at /etc/environment
- Change MySQL port number — The default port that MySQL database server is running under Linux and Unix is 3306/TCP. In order to change the default MySQL/MariaDB database port in Linux, open MySQL server configuration file for editing by issuing the below command.
- Checking apache web server (httpd) version on CentOS 7
- Check network port is open or not on CentOS 7 — To check listening port on CentOS 7, you can do it by "netstat" simply, or you can try it by "ss". I was easily able to check which port is open or not on CentOS 7.
- chmod by type (directory and file permission) — To change permission by type (directory or file), the easiest way can do it is using find command and do something as a follow up action.
- Copy updated/new files if the date is no later than the target in Linux — You can backup the latest updated/new files by cp command in Linux(CentOS 7)
- Count number of process in Linux shell — In some cases, you may want to know the number of processes working in the system. You can know it by grep -ef | grep <process name> | wc -l
- Enabling a service on boot in Centos 7 — In case that you have service on /etc/init.d/ but it does not start automatically, you can simply enable it by run chkconfig function.
- firewalld on CentOS 7 — When the server is directly connected to the internet, the firewall is to be setup for security purpose. On CentOS 7, FirewallD is a kind of minimum requirements in terms of security point of view. You can simply install FirewallD by sudo yum install firealld and add policy by sudo firewall-cmd --zone=public --permanent --add-service=http
- How do I send email on command line in Centos 7? — Unfortunately Centos 7 minimal version does not have mail client running on command line, but you can use it by installing mailx.
- How to avoid CORS errors on CentOS 7
- How to check CentOS version? — The simplest way to check CentOS version is reading release information on /etc/centos-release:
- How to Extract Files From a .tar.gz or .tar.bz2 File on CentOS 7
- How to monitor CPU temperature on CentOS 7 — One of the pain points I experienced was that ffmpeg makes CPU in high temperature, so server die. In that case, you may want to check CPU temperature, and watch sensors enables to see it in realtime.
- Increase Number of Open Files Limit in Linux — In Linux, there are some cases that application needs to open multiple files at the same time - probably database like MySQL is one of the cases accessing multiple files at the same time, because MySQL create files for table and its index on the file system, so it will cause opening multiple files at the same time.
- Install Git 2.x on CentOS 7 — You may want to higher version of Git if you use Visual Studio Code (a.k.a. vscode) - its version will be Git 2.x probably. In that case, you can install by WANDisco repo package easily.
- Install GitLab Community Edition on CentOS 7 — GitLab is an open source repository manager based on Rails developed by GitLab Inc. It is a web based git repository manager that allows your team collaborate on coding, testing and deploying applications. GitLab provides several features, including wikis, issue tracking, code reviews, and activity feeds. GitLab Community Edition is designed to self-hosted and free, but it does not provide technical supports. GitLab supports not only for CentOS but also other operating system as well.
- Install mod_url to support multi byte characters on CentOS 7 — mod_url enables httpd to support multibyte characters like Korean file, so you can download Korean file (한글파일) from your apache server without any error message. httpd basically does not support it, so you should install mod_url.
- Install MySQL 5.7 on CentOS 7 — To install MySQL 5.7, you should enable MySQL 5.7 community release yum repository on your system.
- Install PHP on CentOS 7 — You need to run yum in order to use PHP after setup your CentOS 7. Even though you have httpd, PHP may need to be installed manually. For compatibility with various applications like PHPMyAdmin, PHP-based server management, you will need to install additional libraries.
- Install the latest version of Python on CentOS 7 — This is the easier method of the two for installing Python on your machine. Here, we simply add a repository that has the pre-compiled version ready for us to install. In this case, we are adding the Inline with Upstream Stable repository, a community project whose goal is to bring new versions of software to RHEL-based systems.
- libstdc++.so.6: version `GLIBCXX_3.4.20' not found error
- List the current process by CPU occupation rates — ps is useful command to check process. It also supports to check CPU occupation rates.
- Method to check if OS is 32bit or 64bit on CentOS — To know whether your system is 32-bit or 64-bit, type uname -m
- Mount remote directory by SSHFS in CentOS 7 — SSHFS is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection.
- Mount samba shares on CentOS 7
- Mount USB mass storage device in exfat on CentOS 7 — To mount USB mass storage device on CentOS 7, you need to add a package repository first and install some exfat utilities.
- My Centos does not have X Windows, how do I install it? — I haven't installed any graphical interface like X Window on Centos, and found its solution how to install it for my personal purpose. Please take a look below steps to install "Gnome Shell" as a main graphical interface.
- NTP on CentOS 7 to synchronize date time clock — NTPD enables you to synchronize the system clock with public ip server.
- pstree on CentOS — pstree is useful tool, but it is not a default application when you setup CentOS. So you will need to install it by yum.
- Reboot server if Google DNS does not respond — The below sh script trigger rebooting server if Google DNS does not respond
- Set locale to en_US.utf8 — If you need to change character set to en_US.utf8 or ko_KR.utf8 on CentOS 7, you can change it by localectl r changing locale.conf. Please take a look belows
- Setup a reverse proxy with mod_proxy on CentOS 7
- Turn SELinux off on CentOS — SELinux(Security-Enhanced Linux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including mandatory access controls. SELinux is a set of kernel modifications and user-space tools that have been added to various Linux distributions.
- Upgrade PHP on CentOS 7/RHEL 7
- Using Redis in PHP on CentOS 7
- CentOS 8 — CentOS 8 is based on Fedora 28 and upstream kernel 4.18: Python 3.6 and limited support for Python 2.7, PHP 7.2, Ruby 2.5, Perl 5.26, MariaDB 10.3, MySQL 8.0, PostgreSQL 10, PostgreSQL 9.6, Redis 5, and etc,
- Configure Firewall on CentOS 8 — On CentOS 8, the default firewall is firewalld, which is used to manage iptables rules on the server. To enable and start the firewalld service on the server, run the following commands.
- Enable/disable network interface on CentOS 7 / CentOS 8 — Once you are done with network configuration, you need to run nmtui-connect to enable/disable network interface based on your need.
- Install htop on CentOS 7 / CentOS 8 — htop is a good option to monitor your system interactively. In order to install htop, you will need to use dnf. If you cannot install htop by yum, you will need to follow following procedure on CentOS 8.
- Install lynx on CentOS 7 / CentOS 8 — I usually use lynx to check website on my terminal, because and it does not require to be on graphical environment - meaning I can see its content on terminal console. It can be installed by adding PowerTools repository in Yum.
- Install MySQL on CentOS 8 — When you install MySQL on CentOS 8, you will need to install other associated packages as well. It can be easily solved by @ option when you call yum command.
- Install PHP on CentOS 8 — You need to run yum in order to use PHP after setup your CentOS 8. Even though you have httpd, PHP may need to be installed manually. For compatibility with various applications like PHPMyAdmin, PHP-based server management, you will need to install additional libraries.
- Remove/Manage services on CentOS 8 — ss or netstat are useful command line tool can list up open ports combined with network services for TCP/UDP. And you can stop/disable/remove that service by systemctl and dnf. Finally you can see process tree by pstree or htop to discover and identify all the process running on your server.
- Set Hostname on CentOS 7 / CentOS 8 — nmtui-hostname is useful command in CentOS 8 which promt you to enter your machine hostname and press OK to finish.
- Set static IP address on CentOS 7 / CentOS 8 — CentOS provides a command line tool - mntui-edit - it will help you to change the necessary internet settings easily.
- Chatbots
- Confluence — Confluence is a collaboration software program developed and published by Australian software company Atlassian.
- 503 Service Unavailable Error displayed in Apache Reverse Proxy environment — If you see 503 Service Unavailable Error in Apache Reverse Proxy Environment with the perfect settings, it might be something associated with server security - it can be solved by /usr/sbin/setsebool
- Add a Jira Kanban board to Confluence — Jira Kanban board is super useful tool to manage tasks efficiently. The similar tool popular on internet might be Trello, but its concept may also similar to Kanban if you take a look in detail.
- Change port number for collaborative editing — If you need to change the port number for collaborative editing of Confluence, you need to add following line on <confluence home directory>/bin/setenv.sh
- Force links to open in a new tab or window on Confluence — By default, all links are opened in the same window on confluence. In order to open that link in new tab or window, we can open it by CTRL+Click Link on new tab or window.
- Hide the Space Tools menu for Anonymous Users in Confluence — When you want to hide some menu for anonymous users, Custom HTML is useful.
- How do I check confluence java settings on Centos 7? — If you want to check your java settings on Centos 7, you can simply check by "ps" command.
- How to solve when Confluence editor page loading takes too long? — I am running multiple Tomcat instances for confluence, and faced that confluence page loading takes too long. In addition, my server suddenly faced huge amount of CPU consumption including memory.
- Integrate Jira and Confluence together — Jira project chart like Kanban can be easily embedded on Confluence, Please take a look following steps.
- Limit access permission to Confluence by IP address — I wanted to setup a confluence for me and some limited organization, but confluence does not have that feature at the moment, and I was able to make it by modifying server.xml.
- My confluence server has no response without any errors — If you found that your server shows "Proxy Error" - "Error reading remote server", it might be associated with the system resources or settings.
- Page break on confluence content — In case that you need a page break between para graphs, you will need to add following HTML tags
- Restart confluence on Centos 7
- Restrict the ability to export a Space in Confluence
- Stylesheet for exporting PDF
- Data Visualization Tools
- Delphi
- Accessing Registry Keys and Items on Windows — TRegistry is a useful class can access Windows Registry which can check if the key exists or not, create a key, write a key, and etc.
- Adding a secret key in a program file — I had some projects needs to put its own secret key when they needed, and the secret key should not be exist as an alternative file or stored in any secret place in order to have mobility - meaning that application having a secret key should be able to use in any PC/Laptop. The easiest approach can do that is adding an additional information at the end of the binary file.
- Associate a Delphi application with a file extension — When user register a application by user choice, there are some registry entries automatically created by windows. By doing the same behaviors like windows, application can be launched automatically by clicking associated files.
- Capture Console Output To Memo in RealTime — The below code captures console outputs and send it in real time to callback function, so the application can handle it such as displaying its progress by adding to memo, so end user may not think the application is hanging while program performing the command.
- Combo box in readonly mode — Sometimes you may want to make user to select item on combo box without any editing permission. For your information, Combo Box is basically allowed user to edit its internal content.
- Downloading a web page as string from web site in Delphi — One of the easiest way can get web page as string is to use TIdHTTP.Get function.
- Enable internet proxy on windows by changing registry key — The code here simply set EnableProxy property to checked on Control Panel like below
- Encrypting a text string based on a key in Delphi — There are lots of way can encrypt a text string based on a key. By the approach, you can use a single numerical key, or text string. In terms of security's point of view, text string-based key has better security performance.
- Exec and Wait with new Thread
- Execute a Console Program and Capture Its Output
- ExtractFileExt — Delphi provides useful filename functions for file drive, file dir, file path, file name, and file ext.
- Find Files in Delphi — The custom procedure FindFiles locates files in a given directory (folder) and its subdirectories, and adds their complete path to a stringlist. Note that recursion is used: FindFiles calls itself at the end of the procedure!
- Get Current Directory
- Get local IP address in Delphi — Introducing three different approaches to get local IP address in Delphi: Winsock, TIdStack and TIdIPWatch.
- Get My Document Folder Location by TPath
- Get remote filename from URL in delphi — To get the filename from a URL, you can retrieve the HEAD information and check Content Disposition header field. For this task, you can use the TIdHTTP indy component. If the Content Disposition does not have the file name, you can try parsing the URL.
- Get Timezone Information in local machine in Delphi — GetTimeZoneInformation() enables you to get timezone information in standard name, standard bias, daylight name, and daylight bias.
- Get Windows Temp Directory — GetEnvironmentVariable() enables to get get environmental variables like TEMP.
- Get year, month, day from current date time — When getting system date time information, DecodeDate() is useful.
- Kill a process directly by program name — In order to terminate process on the current process list, you will need to refer Process Entry - by comparing process name and process entry, you can terminate it by comparing process name.
- Message Dialog in Delphi — MessageDlg() enables you to display system dialog based on various dialog type as well as system buttons,
- Put administrator permission to the Delphi application
- Read/Write data in Windows Registry — TRegistry enables you to read registry entry.
- RunAsAdminAndWaitForCompletion - replacement of ShellExecute
- Run as Administrator and Wait for Completion in Delphi — You may use ShellExecute to run DOS command in Delphi, but it causes lots of run-time error in Windows 10+ based on my experience, because system requires to have some sort of permission. Custom function RunAsAdminAndWaitForCompletion() will help you to clear that issue.
- Running with Delphi application with parameters — If you are considering taking parameters when starting your app, you can take it by ParamCount and ParamStr.
- Save/Load using file in Windows Registry — When application use a certain file, and there are some needs to use the previous file in many reason. In that case, Windows Registry is useful.
- Save Text in TStringList in UTF8 in Delphi — Delphi provides a straightforward way when saving text in TStringList in Unicode. Please see following example.
- Select Directory in Delphi — Below code is an example to select directory by TFileOpenDialog:
- Simple function can select directory in Delphi — Instead of using TOpenDialog, Delphi provides super simple function can select directory as following:
- Simple Thread Example in Delphi
- String replace by regular expression in Delphi — TRegEx is a useful class for regular expression. You can define a instance with a regular expression, and match the case by TMatch. If the case exists, the search can be continued by TMatch.NextMatch.
- StringReplace in Delphi — Delphi provides a straight forward function can replace string - StringReplace
- Update domain name at DNSZI in Delphi — To update IP address at DNSZI(http://dnszi.com) http://dnszi.com), you need user ID, auth key, your domain name, and its hostname.
- Difference between Host and Guest Operating System — The main difference between Host and Guest Operating System is that the host operating system runs directly on the hardware while the guest operating system runs on the virtual machine. You can run hypervisor like QEMU, VMWare, and etc, and setup virtual machines based on your design.
- Docker
- Installing docker on Centos 7
- Installing docker on Mac
- Installing docker on RedHat
- Installing docker on windows — Just tested it on windows 10, so other OS version may not able to run as I have done.
- EmEditor — EmEditor is a text editor for Windows that supplies larger files and Unicode, macros, plug-ins and more
- Escort
- ffmpeg — ffmepg is a integrated tool for video encoding/decoding processing as open source project - http://ffmpeg.org http://ffmpeg.org
- Add an image overlay in front of video using ffmpeg
- Creating a master HLS playlist.m3u8 in FFmpeg — FFmpeg kindly provides a straightforward way can create master HLS playlist. You can simply do it by adding master_pl_name as a part of ffmpeg encoding options. Make sure to require a closed GOP when encoding and to set the GOP size to fit your segment time constraint. For more information, please refer at https://ffmpeg.org/ffmpeg-formats.html#hls https://ffmpeg.org/ffmpeg-formats.html#hls
- Encoding videos in .ts by FFmpeg — Below example shows how to encode video in .ts by FFmpeg
- ffmpeg with NVIDIA CUDA GPU
- Installing FFmpeg on CentOS 7 — sdsds
- Splitting video file by size in bash
- Firebase — Firebase is a mobile and web application development platform developed by Firebase, Inc. in 2011, then acquired by Google in 2014.
- Git — Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
- Setup Git Client with TortoiseGit on Windows 10 — TortoiseGit is a kind of family project with TortoiseSVN and TortoiseCVN, so if you are familiar with that, you will be easy to use it.
- Setup Git server on CentOS 7 — Git is a part of CentOS 7 repository, so you can install it easily by yum.
- Setup Git server on CentOS 8 — Just like CentOS 7, CentOS 8 provides git as a part of repository. You can simply install it by yum - it is super straightforward and easy in terms of server's point of view. It requires just creating an account for git and running couple of commands.
- GitLab - Cloud-Native CI — GitLab is a web-based DevOps lifecycle tool that provides a Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features, using an open-source license, developed by GitLab Inc.
- 502 - Whoops, GitLab is taking too much time to respond — If you face 502 error from gitlab server, it means that server is busy for doing something in most of cases. It might be associated with server performance.
- Apache settings when GitLab Web IDE does not work under proxypass environment
- Changing GitLab repository — In order to change the data directory, you need to add git_data_dirs in /etc/gitlab/gitlab.rb
- Creating multiple GitLab merge requests in CLI. — Whenever I need to create multiple merge requests for Git, I use shell scripts in CLI.
- GitLab bash commands useful — While collaboration, you may need to pull, commit, and push in CLI. Followings are bash scripts I use in my system.
- GitLab Tutorials
- Google Cloud Printer — Google Cloud Printer enables you to print on any network environment once that is connected to the internet. The requirements for you to use it is google account and your printer connected to your host computer.
- GraphQL — GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.
- gRPC — gRPC (gRPC Remote Procedure Calls) is an open source remote procedure call (RPC) system initially developed at Google. The first g seems like Google.
- G Suite
- Getting an email in a single mailbox with multiple domain name at G Suite — I have lots of domain name and use G Suite for a single domain. I needed to create a mail account for one of another domain names, and tried to find a way to combine with the existing G Suite domain. Following procedure enables you to combine your G Suite with multiple domain names.
- HLS Live
- EXT-X-DISCONTINUITY in HLS — EXT-X-DISCONTINUITY marks a discontinuity between two consecutive segments. Your discontinuity is between segment1.060.ts and file.000.ts. There is no discontinuity between file.000.ts and file.001.ts so no need to re-insert the tag
- HTML / HTML5 — HTML5 is a software solution stack that defines the properties and behaviors of web page content by implementing a markup based pattern to it. HTML5 is the fifth and current major version of HTML, and subsumes XHTML.
- Adding HTML content dynamically by innerHTML — When you assign ID for HTML entity for <p> tag or <div> tag, we can dynamically update its content. You can find the object by getElementById(), and do the necessary actions into innerHTML. For instance, you can do it like document.getElementById( "element_id").innerHTML = "hello, world!";
- Combo box (drop-down list) in HTML — To implement Combo box also known as drop-down list, you should use <select> tag
- Creating a beautiful table with CSS(style sheet) in HTML5
- CSS cursor Property in HTML5 — CSS can generate a bunch of different mouse cursors:
- Drag and drop image in div tag in Javascript/HTML5 — Drag and drop is a very common feature. It is when you "grab" an object and drag it to a different location. In HTML5, drag and drop is part of the standard: Any element can be draggable. The element you should keep in mind is draggable="true" ondragstart="func(event)" for starting drag, and ondrop="drop(event)" ondragover="allowDrop(event)" for accepting dragging.
- Draggable DIV tag combined with Javascript — For draggable DIV tag, what you need to keep in mind is "position: absolute" in style sheet.
- Drawing circle — arc( x, y, radius, sAngle=0, eAngle=0) enables you to draw a circle easily.
- Drawing rectangle — In order to draw rectangle, you can use rect( x, y, width, height).
- HTML5 Canvas — The HTML5 <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript). However, the <canvas> element has no drawing abilities of its own (it is only a container for graphics) - you must use a script to actually draw the graphics. The getContext() method returns an object that provides methods and properties for drawing on the canvas.
- HTML5 File Upload Progress Bar — By the combination of PHP + HTML + Ajax, you can render an file upload progress bar in your file upload forms. It will help for user to understand what is going on on server side, and the user may able to recognize if anything wrong is happen.
- Playback Video in HTML5 — In HTML5, playback video is super easy by <video width="...." height="...." autoplay> tag. You can also set its source by <source src="movie.mp4" type="video/mp4"> tag.
- Redirect from an HTML page — Page redirection is a situation where you clicked a URL to reach a page A but you were directed to another page B. It happens due to page redirection. To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value in the content is the number of seconds; you want the page to redirect after.
- Viewport for optimizing web pages for computer and tablets
- Java
- Javascript — JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.
- Array Length in JavaScript — In JavaScript, <array>.length returns the total number of item.
- Check if the variable is object or not — typeof <variable name> shows its type in string in JavaScript
- Javascript code snipets
- jQuery — jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
- node.js — Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
- react.js — React is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications.
- tensorflow.js — tensorflow.js is a JavaScript library for training and deploying ML models in the browser and on node.js.
- TinyMCE — TinyMCE is an online rich-text editor released as open-source software under the LGPL. It has the ability to convert HTML textarea fields or other HTML elements to editor instances.
- Useful Javascript Snifets — is_empty(), _size(), _() are useful javascript code snifets frequently used for development
- Vue.js — Vue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces that based on MVVM(Model–View–ViewModel). Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with mod
- Mac
- How do I fix "Java Command-Line Tool Pop-Up" on Mac OS
- How to fix when Mac book pro fan is too loud(noisy)? — When your Mac book pro fan is loud without any dependency in running application, you should have a doubt. Usually the fan could be noisy when your Mac book needs to cool system's heat. But if that is not the case and fan is working loud, it might be caused by some kind of complex conditions triggering that in SMC(System Management Control) associated with temperature sensor in Mac book pro.
- Microsoft EXCEL — Microsoft Excel is a spreadsheet developed by Microsoft for Windows, macOS, Android and iOS. It features calculation, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications.
- Microsoft Windows — Microsoft Windows is a group of several graphical operating system families, all of which are developed, marketed and sold by Microsoft. Each family caters to a certain sector of the computing industry.
- Batch file can kill explorer running on background and start new instance
- Disable windows update on Windows 10
- How to stop kicking user out while remote desktop connection is established on server
- How to view saved Wi-Fi passwords in Windows 10
- Install OpenSSH on Windows 7
- Install SSH on Windows 10
- Kill chrome.exe to escape slow computer performance
- List tasks running on the system
- Logon automatically when power is on
- Port forwarding in Microsoft Windows by PortProxy in NetSh
- Update windows on command line — Microsoft Windows Update can be done by command line tool. What you should do is very simple: wuauclt /detectnow /updatenow
- Virtual desktop on windows 10
- Windows 10 built-in alarm clock - you can set alarm easily
- MikroTik Router — MikroTik is a Latvian network equipment manufacturer. The company develops and sells wired and wireless network routers, network switches, access points, as well as operating systems and auxiliary software. The company was founded in 1996 with the focus of selling equipment in emerging markets.
- How do I open WebFig for External User in Mikrotik Router — In order to allow connect to Mikrotik Router WebFig remotely, you should add a firewall filter and NAT rule for remote connection in WebFig.
- How to setup a hairpin to certain local server — I have a web server needs connection from external/internal location, but just opening a port, by NAT Port Forwarding, may not good enough as far as I experienced in MikroTik router - you cannot connect to your server by domain name. Following configuration enables you to connect to your local server by domain name like you do on external network.
- MySQL
- Backup (dump) and restore database in mysql — mysqldump enables you to backup all the necessary database you need, and mysql enables you to restore the dumped data on linux console.
- Increase max_open_files for Mysql max-connections in Ubuntu 15
- Insert a record in array into MySQL database with PHP — Technically you cannot insert array values into MySQL database table directly without understanding its data type correctly. If it's data type is all the same, you can implement it by array_keys()
- MySQL Query based in RegExp
- MySQL Replication for enhancing performance or backup — If you are considering securing more performance in MySQL, Replication is one of the options you can take. You may able to setup a main database for Write, and the other option you can take is to setup a replication connection between main and another MySQL server. Another server could be used for read-only.
- Repair / Optimize MySQL Database
- Setup MySQL 8.x on Mac — There are some differences in between Mac and Linux(CentOS) for my.cnf and some command line interfaces. There are two different approach to install MySQL on MAC: 1) Install by dmg file can download at https://www.mysql.com/downloads/ https://www.mysql.com/downloads/ and 2) installing by brew. I will talk about the installation based on brew here.
- ownCloud
- Add local system directory to ownCloud as external storage in options — You may not able to add your local system storage in the system ownCloud installed. It's conceptually system local storage, but treated as external storage in terms of ownCloud's point of view.
- PHP — PHP: Hypertext Preprocessor is a general-purpose programming language originally designed for web development. It was originally created by Rasmus Lerdorf in 1994; the PHP reference implementation is now produced by The PHP Group.
- 32bits simple hash function in PHP — PHP provides a simple function can hash in 32bits - hash( $algorithm, $key) - it will provide 8 bytes string as hash result.
- Bob Jenkins' One-At-A-Time hashing algorithm in PHP — Bob Jenkins' One-At-A-Time hashing algorithm is simply known as jenkins_hash() providing 8 bytes long hash value.
- Call PHP-based server URL without its extenstion (.php) — If you develop software based in PHP but you don't know to show its extension(.php) like http://foo.com/auth http://foo.com/auth instead of http://foo.com/auth.php http://foo.com/auth.php, you can make your PHP page work without its extension by adding ForceType application/x-httpd-php on .htaccess
- Check CPU - is AMD or Intel? — In CentOS 7, CPU information is stored in /proc/cpuinfo, so you can implement to acquire CPU information in the system.
- Checking XML element by preg_match — Below code shows how to check XML element by preg_match
- Clearing a PHP value/array — Sometimes, you will need to reset variables, and unset() will help you to do it.
- Client IP address in PHP
- Codes need to be changed when upgraded from PHP 5.6 to PHP 7.3
- Crontab run parts in every 5mins
- Date Time conversion for RSS / Sitemap in PHP
- Delete one element in PHP array — The unset() function in PHP resets any variable. If unset() is called inside a user-defined function, it unsets the local variables. If a user wants to unset the global variable inside the function, then he/she has to use $GLOBALS array to do so. The unset() function has no return value.
- Display the result of running python code by shell command (shell_exec) in PHP — I usually use shell_exec when I need to run python code. The benefit of shell_exec is returning the result as string, so I can use it for other purpose.
- Downgrade PHP from version 7.3 to 7.2 on CentOS — You can downgrade PHP from version 7.3. to 7.2 by yum and yum-config-manager.
- file_get_contents() gets no content from HTTPS URL — You can resolve above issue by adding additional parameters not to check SSL certificate in file_get_contents(), s
- file_get_contents with custom User-Agent in PHP — To put custom User-Agent value with file_get_contents, you will need to create a stream_content.
- Find files in PHP — scandir( $path) returns the searched result in array. If you want to implement recursive scan for sub directories, you can implement it by checking filetype().
- Function as a part of parameter in PHP — PHP provides super easy feature can put a function as a part of function parameter. You can just put it like function exampleMethod( $customFunc).
- get_headers() with timeout — To set timeout in get_headers(), you will need to set stream_context_set_default(), so you can optimize communication cost as you designed.
- Get Client's IP Address in PHP — I had got client's IP address by $REMOTE_ADDR or $_SERVER['REMOTE_ADDR'], but it does not work on latest version of PHP.
- Get DB field name in PHP PDO from MySQL query result — PDO provides a method to get database field name (column name) from the query result.
- Get elements in GET, POST, COOKIE, SERVER as variable — The extract() Function is an inbuilt function in PHP. The extract() function does array to variable conversion. That is it converts array keys into variable names and array values into variable value. In other words, we can say that the extract() function imports variables from an array to the symbol table.
- Get file extension in PHP — pathinfo() in PHP enables you to have file extension easily.
- Get file path in PHP — pathinfo() provides various information like dirname, basename, extension, and full filename. You can get intended result by pathinfo( $filename)['dirname']
- Hash value for file — If you want to make a simple logic to get hash value for file, hash_file() gives you a straightforward solution.
- JSON file management in PHP — PHP provides strong solutions for JSON. json_encode($src_obj) converts obj to JSON text. json_decode($src_text) converts text string to JSON object.
- Loading a text file in PHP — PHP provides useful functions can read text file directly instead of open → read → close: readfile(), file_get_contents() - personally I prefer to use file_get_contents(), because it does not display anything after reading the content.
- No match for argument: php-mcrypt on CentOS 7 — mcrypt package is not included in the default CentOS repositories. It can be installed from the Remi repository.
- No match for argument: php-pecl-memcache on CentOS 7 — php-pecl-memcache package is not included in the default CentOS repositories. It can be installed from the Remi repository.
- No match for argument: php-tidy on CentOS 7 — php-tidy package is not included in the default CentOS repositories. It can be installed from the Remi repository.
- PHP_SELF — PHP_SELF is a variable that returns the current script being executed. This variable returns the name and path of the current file (from the root folder). You can use this variable in the action field of the FORM or any place when you write a code dynamically.
- PHP configuration I commonly use — In the PHP, error_reporting does not need to be detail necessarily for security purpose, and short_open_tag could cause coding error easily, but needs to be used for backward compatibility in some cases.
- PHP does not show any errors
- PHP Frameworks — There are lots of frameworks available in PHP
- PHP Server RESTful API example to get message body — When call RESTful API containing JSON data in the body, server needs to take its content, but getting it by parameters may have some restrictions like data length or etc. To avoid that error, the easiest way can do it will be taking it from entity body directly. file_get_contents('php://input') will help you to solve it easily.
- preg functions as replacement of ereg/eregi functions in PHP — In PHP 7.x, ereg functions are no longer supported. Based on my search on internet, ereg functions use a very limited regex flavor called POSIX ERE - meaning pref functions can cover more REGEX syntax as designed.
- Preparing production and staging environment in PHP project — When developing live service but requiring continuous maintenance/development in agile manner, codes needs to be handled by the operation environment (staging/production) - you may able to add development environment by your situation. In that case include_path is super useful.
- Queue implementation in PHP — To implement Queue, the easiest way can do it is using array() to store elements, and array_shift() to extract elements at the front of the Queue.
- Recognize Korean text in string in PHP
- Resize image with keeping aspect ratio (width x height) in PHP — The code cfolderResizeImage() will enable you to resize the source image with keeping aspect ratio in PHP.
- Restart server daemon by checking dead processes in PHP — PHP is a good language to manage remote/local server. Below code shows how to restart daemons like httpd, mysqld, Confluence and Jira by PHP.
- Run shell commands on remote server in SSH — I wanted to run a specific command through ssh protocol on my server. And this is super helpful to do some kind of remote processing by PHP easily, so I do not need to log on remote server.
- Saving a text file in PHP — file_put_contents($filename, $src) is useful function if you want to save a text file in PHP
- Set default timezone by date_default_timezone_set — When you want to set the default timezone used by all date/time functions, you can take one of two options: 1) put date_default_timezone_set() on your code, 2) put value in php.ini
- Simple function appending strings to a text file
- Stacked bar chart for PHP
- substr( $str, $start, $length) in PHP — substr() returns part of a string
- Thread implementation in PHP — A thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system. In the PHP, you can divide and conquer your planned process efficiently by Thread.
- Uploading a large sized file more than 2G — To upload a large sized file more than 2G in PHP, the OS must be based in 64bits instead of 32bits, and you should change some settings in /etc/php.ini and LimitRequestBody=0 in httpd.conf or virtualhost
- Upload multiple files serially and show its progress in real-time with XMLHttpRequest and PHP — Uploading files serially is strongly needed when uploading large files to the server, because it helps user to ensure the uploaded file is correctly delivered or not, so they can do the necessary things easily.
- Upload multi selected files with single array variable in PHP — Array in HTML5 is useful when upload files with multi selection on file management dialog. Note that you should add tag (multiple="multiple") to the "file" type element. In the PHP, you will be able to manage uploaded files easily by index.
- PostgreSQL — PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and technical standards compliance. It is designed to handle a range of workloads, from single machines to data warehouses or Web services with many concurrent users.
- Create a database in PostgreSQL
- Install PostgreSQL on CentOS 7 — PostgreSQL is a part of default CentOS repositories, so yum can be used to install it.
- PostgreSQL Automated backup on CentOS — PostgreSQL provides pg_dump to backup your database in a single file easily. You can backup your database based on your schedule combined with cron job on your CentOS.
- Python — Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant white space.
- _tkinter.TclError: no display name and no $DISPLAY environment variable — If you face _tkinter.TclError when you run your python application based on MatPlotLib on CentOS 7, it might be caused by MatPlotLib choose Xwindows backend by default.
- Django
- Install Pandas, NumPy and MatPlotLib on CentOS 7 — For data processing in Python, Pandas and NumPy are super useful. Before installing Pandas and NumPy, you should have pip on your CentOS 7.
- Install Tkinter on CentOS 7 — Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de facto standard GUI.
- Python Code Snippets
- QEMU — QEMU is a generic and open source machine emulator and virtualizer a.k.a. hypervisor. QEMU works like VMWare, VirtualBox and etc.
- Sample DOS Shell scripts to create/run QEMU image — In order to run QEMU Image on Windows, DOS Shell scripts are useful which helps doing the necessary things easily.
- Raspberry Pi
- Redis (Remote Dictionary Server) — Redis is an open-source in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, hyperloglogs, bitmaps, streams and spatial indexes.
- Redis Installation on CentOS 7 — Redis package is not included in the default CentOS repositories. It can be installed from the Remi repository.
- Ruby — Ruby is a dynamic, interpreted, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan. According to the creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp.
- SCTE-35 Ad Marker
- SEO (Search Engine Optimization)
- SSL — SSL means Secure Socket Layer widely used in World Wide Web. In order to support SSL on Web Server, you should purchase certificate that compatible with known commercial browsers such as internet explorer, chrome, opera and so on.
- SSO (Single Sign On) — Single sign-on, or SSO, is one of the best solutions for managing account access and mitigating the problems caused by the growing number of apps and logins.
- OAuth — OAuth is simply a secure authorization protocol that deals with the authorization of third party application to access the user data without exposing their password. eg. (Login with fb, gPlus, twitter in many websites..) all work under this protocol.
- SAML (Security Assertion Markup Language) — SAML(Security Assertion Markup Language) allows security credentials to be shared by multiple computers across a network. It describes a framework that allows one computer to perform some security functions on behalf of one or more other computers (Authentication, Authorization)
- Sublime Text — Sublime Text is a shareware cross-platform source code editor with a Python application programming interface. It natively supports many programming languages and markup languages, and functions can be added by users with plugins, typically community-built and maintained under free-software licenses.
- Set F1 key to reindent in Sublime Text — You may often need reindent your code. You can set F1 key to reindent your code by following steps:
- Using FTP/SFTP in Sublime Text — SFTP package is super useful if you want to have a development environment like Visual Studio Code. You can open the cloned remote folders on navigation pane, open, modify and sync-up with remote server easily.
- Tensorflow
- tmux — tmux is a terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing SSH sessions to remain active without being visible.
- vim — vim is a highly configurable text editor for efficiently creating and changing any kind of text. It is included as "vi" with most UNIX systems and with Apple OS X.
- Visual Studio Code
- Writing codes on remote server via SSH/SFTP by 'Remote - SSH' plugin on Visual Studio Code — When we need accessing remote server to develop software on Microsoft Visual Studio Code, 'Remote - SSH' is really useful as far as I experienced, so you can manage files remotely just like your local hard disk. One of the benefit compared to other SSH plugins is 'Remote - SSH' checks if there is any change in the file or not, so you can avoid mistake to overwrite to the latest code.
- Writing codes on remote server via SSH/SFTP by SSH FS plugin on Visual Studio Code — When we need accessing remote server to develop software on Microsoft Visual Studio Code, SSH FS is really useful as far as I experienced, so you can manage files remotely just like your local hard disk. If you are in collaborative development using GitHub or BitBucket, you should not try this method, because you may able to spoil someone's source code that you haven't aware.
- VPN
- WebVTT — This specification defines WebVTT, the Web Video Text Tracks format. Its main use is for marking up external text track resources in connection with the HTML <track> element. WebVTT files provide captions or subtitles for video content, and also text video descriptions, chapters for content navigation, and more generally any form of metadata that is time-aligned with audio or video content.
- YAML — YAML is not a Markup Language. YAML is a human-readable data-serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. YAML targets many of the same communications applications as Extensible Markup Language but has a minimal syntax which intentionally differs from SGML.
- zsh — zsh(Z Shell) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. zsh is an extended Bourne shell with man improvements, including some features of Bash, ksh and tcsh.
- Default profile scripts for zsh in Mac OSX — For my easier use in Mac OSX, I usually add below scripts at /etc/zshrc
Overview
Content Tools