How to Match Multiple Lines using Regex in Perl One-liners

Posted on

Perl one-liners with perl’s regular expression statement can be a very powerful text processing tools used as commands in a terminal or a script. By default, the input to the perl one-liner with -p or -n options is passed line by line. However, when we want to match multiple lines, it gets us some trouble.
Read more

How to Install Hyperledger Fabric 2.0 in Ubuntu 18.04

Posted on

Hyperledger Fabric is a consortium blockchain system. It’s performance is relatively good and its modular architecture enables it to be usable in many scenarios. Hyperledger Fabric itself has rich documents and samples of test networks. For beginners, deploying a new network for trying and testing still consumes quite some time. In this post, we will
Read more

How to list and start VirtualBox VMs in command line in Linux?

Posted on

VirtualBox is a nice open source virtual machine software. It works nicely on Linux and is supported by many Linux distros like Ubuntu in their official package repositories, so it is quite easy to set it up on Linux. The VMs can also be managed in command line using the vboxmanage command line tool provided
Read more

How to get the metadata of an AWS S3 object?

Posted on

I upload files using the aws cli http://www.systutorials.com/239665/uploading-large-files-amazon-s3-aws-cli/ . But how to get the metadata of an object in AWS S3? You can use the s3api‘s head-object command to get the metadata of an object. Taking one example: $ aws s3api head-object –bucket test-hkust –key dir2/fileupload/fb0c6353-a90c-4522-9355-7cd16cf756ff.file.txt It will print results like { “AcceptRanges”: “bytes”, “ContentType”:
Read more

Installing Dropbox on Linux

Posted on

How to install Dropbox on Linux ? Just follow Dropbox’s instruction here: https://www.dropbox.com/install?os=lnx A quick command for 64-bit Linux: $ cd ~ && wget -O – “https://www.dropbox.com/download?plat=lnx.x86_64” | tar xzf – Use the dropx CLI: http://www.dropboxwiki.com/Using_Dropbox_CLI Download dropbox.py: $ wget -O ~/bin/dropbox.py “https://www.dropbox.com/download?dl=packages/dropbox.py” Set the permissions: $ chmod +x ~/bin/dropbox.py Start Dropbox: $ dropbox.py start Status:
Read more

Deploying ASP.NET Core 2.0 MVC application to Azure Web apps using Visual Studio 2017

Posted on

Introduction In this tutorial, we will be learning as how to deploy .NET Core 2.0 MVC web application on Microsoft Public Cloud i.e. Microsoft Azure, using Microsoft Visual Studio 2017 v15.3 For novice Cloud developers, aspiring .NET / Cloud architects, and all other IT professionals associated with the .NET Core framework & Cloud computing, especially
Read more

How to Set the Static IP Address Using CLI in Fedora/CentOS Linux

Posted on

How to set the static IP address for CentOS 7/Fedora 22+ is introduced in this post. Here, we assume the Linux is using NetworkManager to manage the network. All steps are done as root. Find the interface you want to set the address Command ifconfig -a lists all interfaces. Find the interface name to set,
Read more

How to Upload Large Files to Amazon S3 with AWS CLI

Posted on

Amazon S3 is a widely used public cloud storage system. S3 allows an object/file to be up to 5TB which is enough for most applications. The AWS Management Console provides a Web-based interface for users to upload and manage files in S3 buckets. However, uploading a large files that is 100s of GB is not
Read more

Keeping Linux SSH Session Alive from Disconnecting – Server and Client Side Fixes

Posted on

SSH is a very common tool for Linux/Unix platforms. One annoying problem when using SSH is that the connection may get disconnected if the SSH connection is idle for some time under common configurations. Users may run an infinite loop like while true; do uptime; sleep 30; done when there is no work to be
Read more