- Engineering
- WYSIWYG Editors based on the web — WYSIWYG(What You See is What You Get) Editor is one of the strong features we need to have when we want to have fancy editors like Microsoft Word, Power Point and etc. One of the popular editors available on the web will be CKEditor 5 and Tiny MCE.
- List of Social Networks Share URLs
- Ad Tech
- CSAI vs SSAI
- SafeFrame is a web standard developed by IAB — The Interactive Advertising Bureau (IAB) created the web standard SafeFrame to improve web users' security and privacy while enabling more secure and controlled interactions with embedded ads. SafeFrame allows advertisers to display their content within a predefined, isolated iframe, providing more control over how ads interact with the host webpage. You should try SafeFrame if you are experiencing some kind of performance issues when your app is combined with video/banner ads - unsafe creatives
- Render Ad creatives using setSafeFrameConfig in Google IMA
- Ad Marker - CUE/CUE-OUT/CUE-IN and SCTE35
- Chrome Extension — Extensions are software programs built on web technologies (such as HTML, CSS, and JavaScript) that enable users to customize the Chrome browsing experience.
- Sample manifest for Chrome Extension Version 3 — The manifest file is a JSON file. Here we list the name, description, icons, and manifest version--among other things--of our Chrome extension. For this tutorial, we're working with manifest version 3; think of it like the software version.
- Save values on Chrome Extension
- NGINX — Nginx is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source software, released under the terms of the 2-clause BSD license.
- 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.
- Encode/decode JSON in Python
- Scrape web through BeautifulSoup in Python — A type of Python library called BeautifulSoup makes it simple to manage HTML objects. The real scraping is enabled by "requests. get(url)," and BeautifulSoup makes it possible to manage elements based on html.parser.
- Simple HLS server in Python using the Flask web framework — In this example, the Flask application has two routes: /live/<stream_id>.m3u8 and /live/<stream_id>/<int:sequence>.ts. The first route uses the ffmpeg command-line tool to convert an RTMP stream into an HLS stream, and returns the contents of the .m3u8 playlist file. The second route returns the contents of individual .ts segments.
- Query result from postgresql db in Python — You can run your query by psycopg2 that is widely used to use Postgresql database in Python
- Install the Google Cloud SDK and the necessary components using yum on CentOS 7 — No, there is no official yum repository for the Google Cloud BigQuery Python module. You can install it manually using the wheel files as described in my previous answer, or you can use pip or easy_install to install it as part of the Google Cloud SDK.
- Google Cloud Client Library for Python to run a query on BigQuery — You can use the Google Cloud Client Library for Python to run a query on BigQuery
- Keys (i.e., column names) of the records in the result set — The mysql.connector module in Python provides functions for connecting to a MySQL database and executing SQL statements. When you execute a SELECT statement that retrieves records from a table, you can use the cursor object's description property to get the keys (i.e., column names) of the records in the result set.
- Useful Heredoc in Python — Heredoc is frequently used when develop web app in various platform - it can be easily used by starting """ and ending """
- Install mysql.connector for Python on CentOS 7 — MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2.0 (PEP 249). It also contains an implementation of the X DevAPI, an Application Programming Interface for working with the MySQL Document Store.
- Sample Class in Python
- Default module path in Python
- Query result from mysql in Python — You can get the result of a query using Pythong mysql-connector-python library
- Array as an HTML table with both the array key and the index value in Python
- Set default encoding method as UTF-8 in Python — Python is basically encoding in ascii mode, so you should declare your encoding method you want to use in the code.
- Easy Python Launcher based on PHP — You can run your python code easily based on your web browser if you have Apache+PHP server. Below code enable you to run your code by click
- Python Code Snippets
- 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.
- _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.
- 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.
- Django
- C++
- Makefile example for C++ Project — The makefile is a text file that contains the recipe for building your program. It usually resides in the same directory as the sources, and it is usually called Makefile . Each one of these commands should be a separate rule in a makefile.
- CMake file example for building a C++ project — CMake is cross-platform free and open-source software for build automation, testing, packaging and installation of software by using a compiler-independent method. CMake is not a build system itself; it generates another system's build files.
- Streams from multiple HLS (HTTP Live Streaming) manifest files with multiple resolutions in a 30-second window — There are several classes defined: Segment, Playlist, and HLSManifest. The Segment class has two properties: resolution and url. The Playlist class has a vector of Segment objects and a method addSegment to add segments to the vector. The HLSManifest class has a map of Playlist objects, where the key is the resolution and the value is the Playlist object. It also has a method addPlaylist to add playlists to the map and a method `
- Streams HLS based on two different files as a live service within a 30-second window in C++
- Inserts an SCTE-104/35 AD Marker into a .m3u8 file — There are two differents identifying markers aka SCTE-104, SCTE-35 that created for distinguishing media stream like the original broadcast and advertisement. SCTE-104 is mainly created at SDI Feed and SCTE-35 is created at Encoder.
- Save information in Redis on CentOS 7 using the C++ Redis client library cpp_redis — This code connects to a Redis server running on localhost at port 6379 and saves the key-value pair "key": "value" to the database.
- Implement an HLS stream in C++ using two different sources based on .m3u8 files — In this example, the code reads the URLs from two different .m3u8 files source1.m3u8 and source2.m3u8, combines and sorts them, and writes the combined list of URLs to a new .m3u8 file stream.m3u8. The output file can be used as the manifest for an HLS stream.
- Sample Multi Thread Application in C++ — In this example, two threads t1 and t2 are created to run function1 and function2 respectively. The join method is used to wait for the completion of the threads before the main thread terminates.
- STL (STandard Library)
- HLS Live
- An example of an HLS manifest file (.m3u8) that includes a subtitle track — HLS supports subtitle as a part of HLS manifest (.m3u8)
- Video bandwidth comparison for MPEG-1, MPEG-2, MPEG-4 — Usually MPEG-4 is 2-2.5 times smaller than MPEG-2 and 3-4 times smaller than MPEG-1. MPEG-2 is 30% smaller than MPEG-1.
- Resolve MUST fix issues for Measured peak bitrate in HLS with mediastreamvalidator — You need to set buff_size = max_buffer_size * 1.5, min_buffer_size = max_buffer_size * 0.92, avg_buffer_size = max_buffer_size * 0.96, gop=60, fps=30 in ffmpeg to avoid MUST fix issues with Apple meadiastreamvalidator.
- Example HLS Manifest (m3u8)
- SCTE 35 PID(Packet IDentifier)
- PlutoTV HLS Manifest (m3u8) example
- Apple's Media Stream Validator (mediastreamvalidator) to verify HLS — Apple provides HTTP Live Streaming Tools to help you set up an HTTP Live Streaming service. Media Stream Validator(mediastreamvalidator) is a tool to verify if your HLS has no compatibility issue or not. You can download it at https://developer.apple.com/documentation/http_live_streaming/about_apple_s_http_live_streaming_tools https://developer.apple.com/documentation/http_live_streaming/about_apple_s_http_live_streaming_tools
- 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
- Apple
- Prevent Apple device from going into sleeping mode — It looks like Apple devices are automatically going into the sleep mode when user has no interaction like touch pad or remote controller on tvOS, and that is controllable by UIApplication.shared.isIdleTimerDisabled
- Atlassian Confluence — Confluence is a collaboration software program developed and published by Australian software company Atlassian.
- [Resolved] Error occurred during template rendering on confluence 8.5.3 — My confluence 8.5.3 makes template rendering error after upgrading from 8.0.4 - previously it worked normally on 8.0.4. v8.0.4 is always triggering error - ThreadLocalCache is not initialised. Could not retrieve value for key GLOBAL_SETTINGS
- Broken Access Control Vulnerability in Confluence Server (Oct 2023) — Atlassian is aware of a problem that a few customers have reported. Attackers from outside the company may have used a previously unknown flaw in publicly accessible Confluence Data Center and Server instances to make fake Confluence administrator accounts and get into Confluence instances.
- Uninstall confluence standard in CentOS 7 — Unfortunately, confluence package does not provide uninstaller, so you need to erase all associated files and settings manually.
- Combine Google AdSense with Confluence — If you want to add AdSense to your confluence, that is super easy by adding AdSense scripts at Settings → General configuration → Custom HTML
- Recover/Reset confluence on the existing CentOS server when you have the backup(zip) file — Confluence is installed at /opt/atlassian/confluence in CentOS environment, and the home directory is usally installed at /var/atlassian/application-data/confluence that is known as home directory. To reset confluence, what you should do is simply ereasing home directory. If your server accidentally does not work but the daily backup data is available, you can simple recover it by erasing the home directory.
- 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.
- 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
- 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.
- 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.
- Page break on confluence content — In case that you need a page break between para graphs, you will need to add following HTML tags
- Hide the Space Tools menu for Anonymous Users in Confluence — When you want to hide some menu for anonymous users, Custom HTML is useful.
- 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.
- Integrate Jira and Confluence together — Jira project chart like Kanban can be easily embedded on Confluence, Please take a look following steps.
- 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.
- 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.
- 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
- Stylesheet for exporting PDF
- Restrict the ability to export a Space in Confluence
- Restart confluence on Centos 7
- 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.
- Enable Word-Wrap with Pre Tags — pre tags are super-useful for code blocks in HTML and for debugging output while writing scripts, but how do I make the text word-wrap instead of printing out one long line?
- Set text and background color in HTML body — You can simply set text and background color by style in HTML body
- Change text color, font size and background color in textarea — You can assign text color, font size, background color by style sheet in textarea
- 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.
- Combo box (drop-down list) in HTML — To implement Combo box also known as drop-down list, you should use <select> 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.
- CSS cursor Property in HTML5 — CSS can generate a bunch of different mouse cursors:
- Draggable DIV tag combined with Javascript — For draggable DIV tag, what you need to keep in mind is "position: absolute" in style sheet.
- Creating a beautiful table with CSS(style sheet) in HTML5
- 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.
- 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).
- 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.
- 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.
- 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!";
- Viewport for optimizing web pages for computer and tablets
- 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.
- Browser Memory Checking — In JavaScript, you can't directly access the amount of memory consumed by your code or variables using a standard API. JavaScript does not provide a built-in method to check the memory consumption of objects or variables. However, you can make use of browser-specific tools and techniques to monitor memory usage for debugging purposes.
- Javascript code snipets
- Close tabs in a browser that are associated with a specific domain like "foo.com" using JavaScript code — You can close tabs in a browser that are associated with a specific domain like "foo.com" using the following JavaScript code
- Disable console.log() in javascript — Sometimes console.log() causes a lot of performance and memory issues while its application leaves the repossess for service monitoring/debugging. You can disable console.log() by redefine its functional prototype like console.log = () => {};
- The page visibility API to check if the browser’s tab is active or not in JavaScript — You can use the page visibility API to check whether the current tab is active, closed, or minimized. Whenever the user changes the tab, minimizes it, or opens it again, the visibilitychange event gets triggered in the document.
- Prevent web app into sleep mode by Javascript — You need to take a look at navigator.wakeLock object if you do not want to prevent your web app into the sleep mode. Unfortunately it is not supported in Safari and Firefox, but Chrome browser supports very well.
- Bootstrap
- 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
- 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.
- 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.
- tensorflow.js — tensorflow.js is a JavaScript library for training and deploying ML models in the browser and on node.js.
- 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.
- IAB Categories (a.k.a. OpenRTB Code) — The IAB categories are an industry standard and are heavily used in services like advertising and Internet security and filtering appliances. There are 26 tier-1 (top level) categories, 366 tier-2 (sub level) categories, and an additional 12 tier-3 categories that are specific to the Webshrinker category service. The total number of categories are 404.
- Google
- Vercel — Vercel is a cloud platform for static sites and Serverless Functions that fits based on the workflow. It enables developers to host websites and web services that deploy instantly, scale automatically, and requires no supervision, all with no configuration.
- GitHub
- Atlassian Jira
- Get Atlassian Jira API Key — Atlassian provides an API for Jira. The guide is provided at https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/ https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/
- npm — npm stands for Node Package Manager for the JavaScript programming language maintained by npm, Inc. npm is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry.
- 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 CLI(Command Line Interface) Examples — redis-cli is a useful tool can handle Redis KEYs in the system. You can search / delete / get / clear / check its status simple on your terminal.
- Redis thread implementation in PHP without compilation on CentOS — Redis is a useful solution when design systems on server and required the minimum latency between the client and server for handling message. We can easily build a thread application if we use shell_exec based on & and wait. PHP also provides a solution named as pthreads. but unfortunately the pthreads extension cannot be used in a web server environment. Threading in PHP should therefore remain to CLI-based applications only.
- Uncaught RedisException: Permission denied error in your PHP code — When you face an error Uncaught RedisException: Permission denied in your PHP code, you will need to check if that is working normally in the command line but happening in the web page. If it is, that is 100% caused by your linux security policy. In that case, you will need to turn SELinux policy off that located at /etc/selinux/config.
- Redis Installation on CentOS 7 — Redis package is not included in the default CentOS repositories. It can be installed from the Remi repository.
- Redis with High Availability by Replication
- 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.
- libcaption - open source based closed caption — libcaption is a library written in C to aid in the creating and parsing of closed caption data, open sourced under the MIT license to use within community developed broadcast tools. To maintain consistency across platforms libcaption aims to implement a subset of EIA608, CEA708 as supported by the Apple iOS platform.
- AWS (Amazon Web Service)
- AWS API Access Key ID and Secret Access Key — In AWS, you need Access Key ID and Secret Access Key to call AWS functions. If you don't have access keys, you can create them by using the IAM console at https://console.aws.amazon.com/iam/ https://console.aws.amazon.com/iam/
- IAM
- ffmpeg — ffmepg is a integrated tool for video encoding/decoding processing as open source project - http://ffmpeg.org http://ffmpeg.org
- ffmpeg overlay effect with fade in/out and alphablending — ffmpeg has a feature to overlay image on top of the video with fade-in and fade-out. It also able to combine with alpha value, so its interaction could be more smoother.
- CEA-608/708 Closed Caption — CEA-608/708 cpations are the standard for Digital Video Broadcasting supporting closed caption as a part of video stream. CEA-608 captions are for NTSC vodeos only and its captions are encoded in the signal's VBI for NTSC. CEA-708 captions are considered for digital television only and are encoded directly into the MPEG data packages. The captions follow the CEA-708-D FCC recommendations.
- Burnt-in SRT subtitle based on ffmpeg — ffmpeg provides the straight and easy way to burn-in SRT subtitle. By forece_style, you can customize your subtitle format like font, fontsize,outline,outlinecolor,borderstyle and so on. The disadvantage of burnt-in caption is that can make bad TV experience for those who does not want to see the subtitle on top of the screen. On the contrary, the benefit of the burnt-in subitie is that doesn't require any additional technical tools/modules on the client.
- Encode mp4 with multi subtitles in ffmpeg — ffmpeg can embed subtitles as a part of tracks in a single file.
- Add an image overlay in front of video using ffmpeg — ffmpeg enables you to overlay image on top of the video.
- ffmpeg with NVIDIA CUDA GPU
- 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
- Installing FFmpeg on CentOS 7 — sdsds
- Splitting video file by size in bash
- Televsion
- MySQL
- Essential problem solving method for MySQL query containing emoticon like '\xF0\x9F\x94\x8A S...' — You should alter table charset to use utfmb4 collate utf8mb4_unicode_ci if you face query error when the query string containing emoticon like 📺 or 🔊. Its error message will be something like SyntaxError: Non-UTF-8 code starting with '\xed' ...
- Restore dumped MySQL data on CentOS 7 — Restoring dumped MySQL data is something painful. _restore_mysql.sh enables you to restore the dumped MySQL data easily.
- MySQL connection status — CLI command to check # of network connections for MySQL (port:3306)
- 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.
- 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()
- 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.
- MySQL Query based in RegExp
- 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.
- Increase max_open_files for Mysql max-connections in Ubuntu 15
- Repair / Optimize MySQL Database
- 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.
- bash pause — pause function can be easily implemented in bash by read function.
- 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.
- bash case statements — Sometimes we may wish to take different paths based upon a variable matching a series of patterns. We could use a series of if and elif statements but that would soon grow to be unwieldily. Fortunately there is a case statement which can make things cleaner. It's a little hard to explain so here are some examples to illustrate:
- bash if statement — bash if statement is one of the key features you can cover various use cases
- Monitor incoming HTTPD traffics in bash — tail is useful utility can display logs in Linux bash. tail -f <filename> will help you to show the recent access continuously,
- Perfect solutions when you face "Argument list too long" — The reason this occurs is because bash actually expands the asterisk to every matching file, producing a very long command line. There are some workarounds for cp, mv, rm by find, xargs, and etc.
- 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.
- 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.
- 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.
- The default bash scripts useful on CentOS server
- Tail - useful when debug/monitor based on log file on Linux
- 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.
- EmEditor — EmEditor is a text editor for Windows that supplies larger files and Unicode, macros, plug-ins and more
- 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.
- 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
- Install Python 3.8 on CentOS 7
- Reboot server if Google DNS does not respond — The below sh script trigger rebooting server if Google DNS does not respond
- Free SSL Certificate powered by Let's Encrypt on your CentOS server
- Count number of HTTP threads in CLI — You may want to check the traffics in your server prom time to time, and checking CPU and number of threads are actually essential.
- Forward all incoming packets through a certain port to destination address by iptables on CentOS7
- 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.
- Force a immediate reboot of a remote linux machine — "reboot" or "shutdown" commands are executed daemons are gracefully stopped and storage volumes unmounted. This is usually accomplished via scripts in the /etc/init.d directory which will wait for each daemon to shut down gracefully before proceeding on to the next one. That environment triggers dead-lock situation when one of the daemons are not closing gracefully. To force the kernel to reboot the system will be adding an additional parameter "-f"
- Install PIP on CentOS
- 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.
- Prevent yum command from updating kernel on CentOS 7 — You can simply prevent yum command from updating kernel by adding excluding=kernel* to /etc/yum.conf
- systemd-journald extremely high CPU usage reaching 100% on CentOS — You may want to remove systemd-journald if you faced a case like below situation that reaches 100% of CPU usage by systemd-journald in a limited environment. journald is one of the important service in the linux environment. You can enhance that situation by modifying log level.
- 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.
- Set user in sudoers and run commands with no authentication password in CentOS — You usually need to put password to run commands in sudo. You don't need to put user password if your account belongs to sudoers even though that is not that safer in terms of security point's of view.
- ps aux to json — In case that you need to get process status in JSON, you can generate it by awk combined with ps.
- 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.
- How to avoid CORS errors 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.
- Using Redis in PHP on CentOS 7
- NTP on CentOS 7 to synchronize date time clock — NTPD enables you to synchronize the system clock with public ip server.
- 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
- 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.
- 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.
- libstdc++.so.6: version `GLIBCXX_3.4.20' not found error
- Mount samba shares on CentOS 7
- 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)
- 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.
- 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.
- 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 to Extract Files From a .tar.gz or .tar.bz2 File on CentOS 7
- Checking apache web server (httpd) version on CentOS 7
- Setup a reverse proxy with mod_proxy on CentOS 7
- 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
- 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 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.
- 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
- List the current process by CPU occupation rates — ps is useful command to check process. It also supports to check CPU occupation rates.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- How to check CentOS version? — The simplest way to check CentOS version is reading release information on /etc/centos-release:
- 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
- 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.
- Upgrade PHP on CentOS 7/RHEL 7
- 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 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.
- 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.
- 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.
- Custom URLEncode encoding multi-byte character only
- Copy array in PHP — array_merge() is a straightforward and easy function can copy/merge/concat in PHP
- Run time consuming (background) tasks as post processing with no connection with browser client in PHP — You can flushe all response data to the client and finishes the request to run time consuming tasks with no connection with brower client by fastcgi_finish_request(). This allows for time consuming tasks to be performed without leaving the connection to the client open.
- Find image objects from the plain HTML text with PHP — DOMDocument object enables you to find the necessary HTML objects easily.
- Save a image file in PHP from a image in HTML that encoded in base64 — By copy & paste, we can embed image in the HTML that is mainly supported WYSWYG editor, but it may cause heavy loading time for the web browser. The web browser may work very well if such kind of image files are removed in the HTML. Below PHP code enables you to work more compactly.
- Update/Reload php.ini on MacOS to add include_path for PHP shared libraries — You can find the location for php.ini on Mac by calling php --ini
- 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.
- Display an array as an HTML table with the index value in PHP — foreach($array as $key => $value) is useful when you need key and its value at the same time.
- Display the result of a MySQL query in an HTML table — You can obtain the results of a MySQL server query using the mysqli extension.
- MySQL combination with Heredoc in PHP — Heredoc is one of the useful solution to secure better readability when we code SQL Query in PHP
- Heredoc widely used for SQL in PHP — Heredoc provides an alternative way of defining strings in PHP. They are particularly useful when we need to define a string over multiple lines. They work by defining an identifier that will mark the start and end of the string. The identifier can be any alphanumeric value following the same rules we’d use for variable names. One important thing to note with the identifier is that as of PHP 7.3 you need to make sure that it does not appear within the string itself.
- Remote all class tags in HTML by preg_replace — Removing all class tags in HTML by preg_replace is super easy.
- Get array keys in PHP — array_keys() return array keys in a string array
- Simple PHP Web Shell — Simple & tiny PHP Web shell for executing unix commands from web page.
- Run PThread in PHP for Thread Safe Application — To run thread safe application in PHP, you will need to install PThread manually, because it's not included in the common distribution.
- Unicode Escape in PHP — PHP requires to implement a simple function to escape unicode. Some severs send uncode encoded string for supporting multi byte characters. Its encoded result will be something like \uBBF8\uC158 \uC774\uC2A4\uD0C4\uBD88 4: \uC775\uC2A4\uD2B8\uB9BC \uB370\uC774
- Check if user is root or sudo in php — posix_getuid() returns non-zero if user is root or sudo, so you can warn user to use an appropriate permission if required.
- Array of arguments passed to script in PHP — $argv is an array of arguments passed to script in PHP, so you can know the parameters when user run the script
- Get local IP Address in PHP on CentOS — The easiest way to get local IP Address in PHP on CentOS is using shell command like "hostname -I". I tried several methods to get it, but most of them returns the wrong answer.
- Removing memory limit in PHP — One of the case you need to remove memory limit in PHP will be that your application use memory dynamically and sometimes faces out of memory. In that case, you can simply remove memory limit in your PHP application by setting memory_limit=-1 in /etc/php.ini
- Hash value for a file — If you want to make a simple logic to get hash value for file, hash_file() gives you a straightforward solution.
- Count number of processes and do something in PHP — You can limit number of cron jobs, if you use PHP for DevOps software in CentOS 7, which can be easily implemented by checking process by shell_exec.
- file_exists covers local and internet in PHP — file_exists() is useful function can check the availability of a file. Below customized function enables you to check file availability not only local but also remote file as well.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
- 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
- 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.
- Recognize Korean text in string in PHP
- 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.
- 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.
- 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
- 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.
- 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.
- Crontab run parts in every 5mins
- 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']
- 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().
- Get file extension in PHP — pathinfo() in PHP enables you to have file extension easily.
- Date Time conversion for RSS / Sitemap in PHP
- 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.
- 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.
- substr( $str, $start, $length) in PHP — substr() returns part of a string
- PHP Frameworks — There are lots of frameworks available 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.
- Saving a text file in PHP — file_put_contents($filename, $src) is useful function if you want to save a text file in PHP
- 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.
- 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-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-tidy on CentOS 7 — php-tidy package is not included in the default CentOS repositories. It can be installed from the Remi repository.
- 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.
- 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 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.
- 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.
- 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 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.
- 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.
- 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.
- 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.
- 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
- 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.
- 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
- Stacked bar chart for PHP
- PHP does not show any errors
- Simple function appending strings to a text file
- 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
- INXY — Price: USD 1.99 per 1TB = 0.00019 per 1GB
- 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.
- Apache HTTP server
- Block abnormal user acess in Apache — You may have experience that your website is so slow without any huge traffic-it will be something associated with a bot developed by someone. We have three different options to block abnormal user access in Apache: 1) set a global policy in the Apache httpd.conf 2) set a local policy based on ReWrite Rule in .htaccess. 3) Make a 404 not found error based on the user agent.
- 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
- Apache Module mod_proxy_balancer
- 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
- 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
- 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.
- 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.
- SSH based code sync up with GitLab on Windows 11
- GitLab Project Title with a special character
- 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.
- Creating multiple GitLab merge requests in CLI. — Whenever I need to create multiple merge requests for Git, I use shell scripts in CLI.
- Apache settings when GitLab Web IDE does not work under proxypass environment
- GitLab Tutorials
- Changing GitLab repository — In order to change the data directory, you need to add git_data_dirs in /etc/gitlab/gitlab.rb
- 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.
- 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.
- 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.
- 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:
- 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)
- 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.
- 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.
- 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.
- 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.
- Block accessing .git directory in the Apache Server — You should block accessing your precious source code when you use Apache web server and manage your code based in Git - meaning Hacker can easily stole your precious information from your source code directly when you have .git on your repository directory.
- Useful git command scripts in bash — git provides a straight forward and strong commands, but sometimes scripts will help you to make things simpler.
- Clone a git repository to another directory — To clone to another directory at git, just add the target directory in the clone command.
- 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.
- 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.
- 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
- Create read only user at 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.
- 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.
- 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.
- 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.
- 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.
- 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,
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Firebase — Firebase is a mobile and web application development platform developed by Firebase, Inc. in 2011, then acquired by Google in 2014.
- 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.
- GraphQL — GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.
- 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.
- 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.
- 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.
- Apache Spark — Apache Spark is an open-source distributed general-purpose cluster-computing framework.
- 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.
- Docker
- Delphi
- Message Dialog in Delphi — MessageDlg() enables you to display system dialog based on various dialog type as well as system buttons,
- 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.
- 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.
- Simple function can select directory in Delphi — Instead of using TOpenDialog, Delphi provides super simple function can select directory as following:
- StringReplace in Delphi — Delphi provides a straight forward function can replace string - StringReplace
- Select Directory in Delphi — Below code is an example to select directory by TFileOpenDialog:
- Save Text in TStringList in UTF8 in Delphi — Delphi provides a straightforward way when saving text in TStringList in Unicode. Please see following example.
- Read/Write data in Windows Registry — TRegistry enables you to read registry entry.
- 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.
- Get year, month, day from current date time — When getting system date time information, DecodeDate() is useful.
- Get Windows Temp Directory — GetEnvironmentVariable() enables to get get environmental variables like TEMP.
- 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.
- Enable internet proxy on windows by changing registry key — The code here simply set EnableProxy property to checked on Control Panel like below
- 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.
- 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.
- 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.
- 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.
- 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.
- Running with Delphi application with parameters — If you are considering taking parameters when starting your app, you can take it by ParamCount and ParamStr.
- 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.
- 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.
- 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.
- 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.
- 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 local IP address in Delphi — Introducing three different approaches to get local IP address in Delphi: Winsock, TIdStack and TIdIPWatch.
- ExtractFileExt — Delphi provides useful filename functions for file drive, file dir, file path, file name, and file ext.
- 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.
- Simple Thread Example in Delphi
- Put administrator permission to the Delphi application
- Exec and Wait with new Thread
- Execute a Console Program and Capture Its Output
- Get My Document Folder Location by TPath
- RunAsAdminAndWaitForCompletion - replacement of ShellExecute
- Get Current Directory
- Java
- Mac
- When command key + buttons does not work like command + c, command + w, ... on Mac or Windows — You can simply solve the situation if you keyboard is locked by fn + command. You can return it by fn + command again.
- 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.
- How do I fix "Java Command-Line Tool Pop-Up" on Mac OS
- e-mail
- Chatbots
- VPN
- Tensorflow
- Escort
- Raspberry Pi
- Data Visualization Tools
- SEO (Search Engine Optimization)
- Software Engineering
- Semantic Software Versioning — Semantic versioning (also known as SemVer) is a versioning system that has been on the rise over the last few years. It has always been a problem for software developers, release managers and consumers. Having a universal way of versioning the software development projects is the best way to track what is going on with the software as new plugins, addons, libraries and extensions are being built almost every day. This problem can be solved by Semantic Versioning. In brief, it’s a way for numberi
- Severity Levels in QA(Quality Assurance) Test
- Rollout Plan Process for Development — A rollout plan is a description of how to get your change successfully applied to production and working as expected. The process of creating a rollout plan is often more valuable than the plan itself because you will invest time in thinking about what needs to be done to achieve success.
- Hardwares — I am planning to share knowhow what I learned while using my devices here.
- Logitech K580 — Logitech K580 is wireless keyboard supporting USB as well as Bluetooth connection. In addition, it provides mobile device holder to maximize its usability. In order to optimize its keyboard environment with Mac OSX, you should simply click fn + O for 3 secs, Windows is fn + P for 3 secs. You can also connect with your mobile devices as well.
- Tech companies
- Context Logic (aka Wish) — "Context Logic" has a service, which is named as Wish - an online e-commerce platform that facilitates transactions between sellers and buyers. It was founded in 2010 by Peter Szulczewski (CEO) and Danny Zhang (CTO).
- Confluent — Confluent is the event streaming platform powered by Apache Kafka®
- Asurion - mobile protection by insurance — Asurion, LLC is a privately held company based in Nashville, Tennessee that provides insurance for smartphones, tablets, consumer electronics, appliances, satellite receivers and jewelry. In 2014, the company operated in 14 countries and had 49 offices with 17,000 employees serving 280 million consumers.
- AppLovin — AppLovin is a mobile marketing platform. The company was founded in 2012, but operated in stealth mode until 2014.
- Social Finance (SoFi) — Social Finance, Inc. (commonly known as SoFi) is an online personal finance company that provides student loan refinancing, mortgages and personal loans.
- Roblox — Roblox is a massively multiplayer online and game creation system platform that allows users to design their own games and play a wide variety of different types of games created by other users. The platform hosts social network games constructed of Lego-like virtual blocks.
- Freshworks — Freshworks has apps for small and medium businesses which cater those companies software need in customer support, Asset management, Sales & CRM and more.
- Aidditive Inc — Addictive develops total solutions for finance, public safety and surveillance, media and broadcasting, transportation, healthcare and etc.
- Uptake — Uptake is an industrial artificial intelligence (AI) software company that aims to help companies digitally transform with open, purpose-built software. Built around a foundation of data science and machine learning, Uptake’s core products include an Asset Performance Management application and a fully managed platform.
- IDC (International Data Corporation)
- dunnhumby
- Tanium
- Robinhood
- Niantic
- Flexport
- Unity Technologies
- Software Architectures
- Common Django architecture with uWSGI, NGiNX on CentOS 7 — NGiNX and uWSGI provides a great combination for Django-based web service on CentOS 7. NGiNX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. We use uWSGI to integrate with NGiNX, because NGiNX does not support WSGI - uWSGI is a web server supports WSGI is used to forward requests from a web Server (such as Apache or NGINX) to a backend Python web application or framework.
- Programmatic Advertising Architecture — Traditionally programmatic advertising is also called as online advertising. Programmatic advertising includes real-time bidding as a part of its solution.
- Android AAIDs, Apple IDFAs, Safari & Firefox IDs — There are various type of Identifiers widely used in AD Tech or Audience Measurement Industry - IDFA, AAID, Hashed Device ID, Safari ID, Firefox ID and etc. Unfortunately these formats are not compatible each other except IDFA and AAID. The difference between IDFA and AAID is lowercase/uppercase in Latin characters.
- VMAP for Video Ad Insertion — Video Multiple Ad Playlists (VMAP) are used to return multiple video ads to be played during a video. It offers content owners control over the placement and timing of ads, especially when they lack control or ownership of the player.
- DMP(Data Management Platform) Architecture — DMP(Data Management Platform) is used by digital advertising buyers and publishers to store and manage audience data, often from multiple sources.
- False Positive Error — A false positive error, or in short a false positive, commonly called a "false alarm", is a result that indicates a given condition exists, when it does not.
- ITD(Independent Trading Desk) Architecture — ITD(IndependentTrading Desk) is a kind of Advertiser solutions that uses DSP(Demand-Side Platform) as a tool.
- DSP(Demand-Side Platform) Architecture — A Demand-Side Platform (DSP) is a real-time bidding system that connects media buyers with data exchanges and Supply-Side Platforms(SSPs) through a single interface.
- SSP(Supply-Side Platform) Architecture — SSP(Supply-Side Platform) is a kind of publisher solutions as a centralized platform to sell/manage inventory, access many advertisers, DSPs, etc.
- ATD(Agency Trading Desk) Architecture — ATD(Agency Trading Desk) is a kind of Advertiser solutions that uses DSP(Demand-Side Platform) as a tool. Trading desks are media buyers and re-sellers within an ad agency that help advertisers execute programmatic media buys.
- Facebook Architectures
- Presto - a distributed SQL query engine based on pluggable backend at Facebook — Before elaboration about Presto architecture, you should know Presto is based in Java even though Facebook is known as using PHP as their major server software language.
- Facebook scalable architecture beyond LAMP — Facebook is known as using LAMP as their basic platform for their website. One of the outstanding things Facebook doing very well is that they have their own strategy/architecture based on LAMP. LAMP stands for Linux + Apache + MySQL + PHP that is entirely free and open sourced software, so they can compete with their competitors in competitive operation cost with high-avail-abilities. In person, I think their strategy is pretty much innovative and its status tells their strategy is on the right
- Google Cloud Platform Architectural Patterns
- Scale testing with Kubernetes + Locust in GCP — Locust is an open source tool for quickly scaling up and down load tests of web frontend as REST APIs. It allows testers to quickly create test profiles that can be orchestrated by multiple nodes in order to stress an HTTP endpoint.
- Continuous Integration by Jenkins, automated solution, in GCP — Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat. Below architecture shows continuous integration based in GCP.
- Continuous Delivery with Spinnaker in GCP — CI(Continuous Integration) and CD(Continuous Delivery) are one of the important technologies in terms of Agile Development's point of view.
- Common Web Service Architecture with High Availability in GCP — Below architectural diagram is for common web service composed of web server and database with high availability.
- Software Architectural Patterns
- Pipe-filter architectural patterns - useful approach for analytics based on daisy chain — A very simple, yet powerful architecture, that is also very robust. It consists of any number of components (filters) that transform or filter data, before passing it on via connectors (pipes) to other components. The filters are all working at the same time. The architecture is often used as a simple sequence, but it may also be used for very complex structures.
- Master-Slave architectural pattern — Master/slave is a model of communication where one device or process has unidirectional control over one or more other devices. In some systems a master is selected from a group of eligible devices, with the other devices acting in the role of slaves.
- Active-Active / Active-Stand-by Architectural Pattern — Active-Active / Active-Stand-by architectural patterns are commonly used when we consider fail-over in server deployment design.
- Microservice architectural pattern aka MSA - one of the trends of service architecture in 2018- — MSA (Microservice architecture), or simply microservices, is a kind of methodology to develop service by divide and conquer - a distinctive method of developing software systems that tries to focus on building single-function modules with well-defined interfaces and operations. The trend has grown popular in recent years as Enterprises look to become more Agile and move towards a DevOps and continuous testing. Microservices can help create scalable, testable software that can be delivered weekly
- Interpreter architectural pattern - used in database query language such as SQL — This pattern is used for designing a component that interprets programs written in a dedicated language. It mainly specifies how to evaluate lines of programs, known as sentences or expressions written in a particular language. The basic idea is to have a class for each symbol of the language.
- Blackboard architectural pattern - used in NLU(Natural Language Understanding) and car recognition — Blackboard architectural pattern usually used in Artificial Intelligence Software to implement Non-Deterministic Algorithm.
- MVC(Model-view-controller) architectural pattern - used in web application development like Django and Rails — MVC(Model–view–controller) is an architectural pattern commonly used for developing user interfaces that divides an application into three interconnected parts. This is done to separate internal representations of information from the ways information is presented to and accepted from the user. The MVC design pattern decouples these major components allowing for efficient code reuse and parallel development.
- Event-bus archiectural pattern - used in Android app development and Push Notification Service — Event-bus architecture pattern is a distributed asynchronous architecture pattern to create highly scalable reactive applications. The pattern suits for every level application stack from small to complex ones. The main idea is delivering and processing events asynchronously.
- Peer-to-peer architectural pattern - usually used in file sharing like BitTorrent or multimedia protocols like P2PTV or PDTP — Peer-to-peer architectural pattern (P2P architecture) is a commonly used computer networking architecture in which each workstation, or node, has the same capabilities and responsibilities. It is often compared and contrasted to the classic client/server architecture, in which some computers are dedicated to serving others.
- Broker architectural pattern - usually used in Message Middlewares like Apache ActiveMQ, Apache Kafka, RabbitMQ — The Broker architectural pattern can be used to structure distributed software systems with decoupled components that interact by remote service invocations.
- Layered architectural pattern — Layered Architecture is commonly using when design J2EE application - it is something like defacto standard and widely known by most architects, designers, and developers. The layered architecture pattern closely matches the traditional IT communication and organizational structures found in most companies, making it a natural choice for most business application development efforts.
- Client-Server architectural pattern — Client-server architecture (client/server) is a network architecture in which each computer or process on the network is either a client or a server.
- AWS Architectures
- Amazon ECS services in a VPC — Using Amazon ECS containers in a VPC, you can break up large applications into smaller pieces that can be launched and scaled separately in a safe environment. But making sure that all of these parts, inside and outside of a VPC, can talk to each other can be hard. There are different ways to make conversation easier, and each has its own pros and cons.
- Product Marketing & Recommendation Architecture in AWS for e-commerce website — Product Marketing & Recommendation is one of features that online service websites has to create more user engagement, so online company can try something new together with users.
- "502 Bad Gateway" Error easy to happen at the combination of nginx and node.js in AWS Elastic Beanstalk — Elastic Beanstalk is a Platform as a Service (PaaS) offered by AWS that simplifies the deployment and management of applications. It supports various programming languages, frameworks, and services. Nginx, on the other hand, is a popular web server and reverse proxy server known for its performance, scalability, and configuration flexibility.
- What cause a 502 bad gateway error in AWS environment? — A 502 bad gateway message indicates that one server got an invalid response from another. In essence, you've connected with some kind of interim device (like an edge server) that should fetch all of the bits you need to load the page. Something about that process went wrong, and the message indicates the problem.
- Check incomplete multipart uploads if AWS S3 storage size is abnormally big huge compared to the origin storage — You should check incomplete multipart uploads if your Metrics in the S3 Management Console shows larger size than you actually use.
- Importing a wild card domain SSL certificate into AWS Certificate Manager — AWS Certificate Manager requests three items to register your SSL certificate - you will need to copy & paste your STAR.cert to "Certificate body", your_private.key to "Certificate private key", and STAR.ca-bundle to "Certificate chain"
- AWS VPC Setup Steps — Not like architectural diagram, setting up a VPC environment is not that simple, because it requires to click lots of menus in AWS Console after creating that VPC. Based on my experience, that is not easy to remember, because it's rarely happening process and its complex clicking labors. So I think easy video guide is good enough.
- Enterprise Data Lake Architecture in AWS
- Web front-end architecture in AWS for e-commerce website — Maintaining an e-commerce website with a large product catalog and global customer base can be challenging. The catalog should be searchable, and individual product pages should contain a rich information set that includes, for example, images, a PDF manual, and customer reviews.
- Checkout service architecture in AWS for e-commerce website — Managing the checkout process involves many steps, which have to be coordinated. Some steps such as credit card transactions, are subject to specific regulatory requirements. Other parts of the process involve manual labor, such as picking, packing, and shipping items from a warehouse.
- Large scale messenger service architecture in AWS - Slack case study — Below slack architecture shows how to compose large scale messenger service based in AWS.
- Content Distribution for VOD streaming services in AWS — Below architectural diagram shows how to distribute video content to CDN (Amazon CloudFront) in AWS.
- Secure and Scalable LAMP Service Architecture in AWS — LAMP means Linux + Apache + MySQL + PHP that is commonly used to develop web service for Start-ups that does not require paying license fee, because all of technologies are from open source.
- Time series processing architecture in AWS — When data arrives as a succession of regular measurements, it is known as time series information. Processing of time series information poses systems scaling challenges that the elasticity of AWS services is uniquely positioned to address.
- Financial services grid computing in AWS — Financial services grid computing on the cloud provides dynamic scalability and elasticity for operation when compute jobs are required, and utilizing services for aggregation that simplify the development of grid software.
- Synchronous online gaming architecutre in AWS - Highly Available, Scalable & Elastic to support Millions of Players — The below architecture is intended for online mobile & games. These workloads are a natural fit for running on Amazon Web Services, due to unexpected traffic patterns & high demaning request rates.
- Media sharing service architecture in AWS — Media sharing is one of the hottest markets on the Internet. Customers have a staggering appetite for placing photos and videos on social networking sites, and for sharing their media in custom online photo albums.
- File synchronization service architecture in AWS — Given the straightforward, stateless client-server architecture in which web services are viewed as resources and can be identified by their URLs, development teams are free to create file sharing and syncing applications for their departments, for enterprises, or for consumers directly.
- Disaster recovery solution in AWS for local applications — Disaster recovery is about preparing for an recovering from any event that has a negative impact on your IT systems. A typical approach involves duplicating infrastructure to ensure the availability of spare capacity in the event of a disaster.
- Large scale computing based on huge data sets in AWS — These scenarios involve huge data sets collected from scientific equipment, measurement device, or other compute jobs. After collection, these data sets need to be analyzed by large-scale compute jobs to generate result data sets. Ideally, results will be available as soon as the data is collected. Often, these results are then made available to a larger audience.
- Fault Tolerance & High Availability based on multi Availability zones in AWS — Most of the higher-level services, such as Amazon Simple Storage Service(S3), Amazon SimpleDB, Amazon Simple Queue Service (SQS), and Amazon Elastic Load Balancing (ELB), have been built with fault tolerance and high availability in mind. Service that provide basic infrastructure, such as Amazon Elastic Compute Cloud (EC2) and Amazon Elastic Block Store (EBS), provide specific features, such as availability zones, elastic IP address, and snapshots, that a fault-tolerant and high available system
- Batch processing composed of job manager, job store and worker based on AWS — Batch processing on AWS allows for the on-demand provisioning of a multi-part job processing architecture that can be used for instantaneous or delayed deployment of a heterogeneous, scalable "grid" of worker nodes that can quickly crunch through large batch oriented applications in place today that can leverage this style of on-demand processing, including claims processing, large scale transformation, media transcoding and multi-part data processing work.
- Live streaming / Static Content & Media Service based on AWS — AWS provides a suite of services specifically tailored to deliver high-performance media serving. Each service features pay as you go pricing on an elastic infrastructure - meaning that you can scale up and down according to your demand curve while paying for only the resources you use. BEcause this infrastructure is programmable, it can react quickly.
- Image Moderation Chatbot - a serverless chatbot on AWS that monitors chat channels and removes images suggestive or explicit image — The below architecture shows you how to build a serverless chatbot on AWS that monitors your chat channels and removes images containing suggestive or explicit content.
- Web Application Hosting provides the reliable, scalable, secure, and high-performance infrastructure — High available and scalable web hosting can be complex and expensive. Dense peak periods and wild swing in traffic patterns result in low utilization of expensive hardware. Amazon Web Services provides the reliable, scalable, secure, and high-performance infrastructure required for web applications while enabling an elastic, scale-out and scale-down infrastructure to match IT costs in real time as customer traffic fluctuates.
- AWS Cost Calculator for estimating your required monthly budget — Whenever you design your software architecture based on AWS, you may need to know how must cost it will consume while serving your service - following service will help you to get your estimated cost.
- Advertisement serving in AWS — Internet advertising services need to serve targeted advertising and must do so under limited time. These are just two of multiple technical challenges they face.
- Software Algorithms — In mathematics and computer science, an algorithm (/ˈælɡərɪðəm/ ( listen)) is an unambiguous specification of how to solve a class of problems. Algorithms can perform calculation, data processing, and automated reasoning tasks.
- Equation for surface area of a right rectangular pyramid
- Divide number without / operator — Dividing number without operator can be implemented in two approaches - loop and bit operation
- Safe Add function by checking integer overflow — When we implement add function by operator + in C++, sometimes we face over error - actually system does not show any error and that should be continuously increased, but there is a possibility to change into minus value suddenly.
- Next Permutation ★ — Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). The replacement must be in-place and use only constant extra memory.
- Find First and Last Position of Element in Sorted Array — Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n).
- Maximum Width Ramp ★ — Given an array A of integers, a ramp is a tuple (i, j) for which i < j and A[i] <= A[j]. The width of such a ramp is j - i. Find the maximum width of a ramp in A. If one doesn't exist, return 0.
- Flip Equivalent Binary Trees — For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip equivalent to a binary tree Y if and only if we can make X equal to Y after some number of flip operations. Write a function that determines whether two binary trees are flip equivalent. The trees are given by root nodes root1 and root2.
- Remove Element — Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. The order of elements can be changed. It doesn't matter what you leave beyond the new length.
- Remove Duplicates from Sorted Array — Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
- Reverse Nodes in k-Group — Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.
- Swap Nodes in Pairs — Given a linked list, swap every two adjacent nodes and return its head.
- Generate Parentheses — Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
- Merge Two Sorted Lists — Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
- Valid Parentheses — Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
- Pow(x, n) — Implement pow(x, n), which calculates x raised to the power n (xn).
- Remove Nth Node From End of List — Given a linked list, remove the n-th node from the end of list and return its head.
- Longest Common Prefix — Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "".
- Roman to Integer — Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
- Integer to Roman — Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
- String to Integer (atoi) — Implement atoi which converts a string to an integer.
- Reverse Integer — Given a 32-bit signed integer, reverse digits of an integer.
- ZigZag Conversion — The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
- Longest Palindromic Substring — Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
- Merge k Sorted Lists — Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
- Median of Two Sorted Arrays — There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
- Longest Substring Without Repeating Characters — Given a string, find the length of the longest substring without repeating characters.
- Two Sum — Given an array of integers, return indices of the two numbers such that they add up to a specific target.
- Climbing Stairs ★ — You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
- Add Two Numbers — You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
- 4Sum — Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.
- 3Sum — Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
- Sports