Git Cheatsheet - 2021
Dec 4, 2020Creating Snapshots Browsing History Branching & Merging Collaboration Rewriting History Housekeeping(Personal Favorites) Creating Snapshots Initializing a repository 1git init Staging files 1git add file1.js file2.js # Stages multiple files 2git add . # Stages the current directory and all its content Viewing the …
Read MorePodman Basic Notes
Nov 7, 2020Playing around with Podman 1alias docker="sudo podman $1" The above command works as of this time and podman makes namespaces for every users for every resources, i.e., images, containers and so on. It means, podman images and sudo podman images will show different resources.😎 1sudo podman pod create --name …
Read MoreKubernetes Basic Notes
Nov 7, 2020Kubectl Installation 1curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" 2chmod +x kubectl 3echo $PATH 4sudo mv kubectl /usr/local/bin/ Minikube Installation 1curl -LO …
Read MoreThis article is based on the content of aws knowledgebase. You might have been stuck in memory leak when building some kinda javascript-heavy frontend apps like Vue or React on a cloud server itself. Just for serving built artifacts, we do not need large instances, but still the building process is always hungry for …
Read MoreThis article is based on the contents of the Github's documentation. You will get your own verified badge on every git commits once you configure your GPG key with your VCS. First things first, check your gpg version using this command: 1gpg --version Allow me to assume that you are on version 2.1.17 or greater. Use …
Read MoreI've just finished the migration of my blog from ghost self hosting to hugo. I'm more than happy to use { framework: "Hugo", hosting: "Firebase", cicd: "CircleCI" }. Just wanted to share the full path how I got it done, which was not a piece of cake, you know, it's like kinda …
Read MoreAs a software engineer or a DevOps engineer, you may come up with boring tasks frequently, one of which is setting up a new cloud environment for deployment of your awesome web apps/micro services. Using the following script, you will lose the dull pain. Just grab the script and run it with bash, then you will get the …
Read MoreIn some cases, you may get stuck due to docker and docker compose version. Let's follow up on docker official documentation: 1apt remove docker docker-engine docker.io containerd runc # purging the legacy version if exists 2apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common …
Read MoreI strongly believe that "lazy developer" is a synonym of "talented developer" from a motivational point of view. Okay, let's get started with Jenkins setup then. Let's go for password login for deployment, remembering that it's not the only way nor an elegant way of implementation, but just follow …
Read MoreLet's Encrypt - A Right Way in 2020
Jun 11, 2020Today I'm going to share a neat way to set up your let's encrypt (up-to-date way in 2020). First off, we will have to get the script using this command: 1wget https://dl.eff.org/certbot-auto Then enable the script to run globally as we expect using this commands: 1chmod +x certbot-auto 2mv certbot-auto certbot 3echo …
Read MoreHow to Install Golang on Manjaro
May 22, 2020Manjaro is an attractive distro built on top of Arch. Let's get golang development environment ready on your Manjaro machine! You can just update the whole system packages and then simply install golang stable version provided by the Arch repository, not sure what it's called really. 1pacman -Syu 2pacman -S go 3go …
Read MoreAs you may know, the package manager of Arch Linux is "pacman". 1sudo pacman -Syu #Update and upgrade system packages 2sudo pacman -S package_name #Install a new package 3sudo pacman -R package_name #Remove a package 4sudo pacman -Rn package_name #Remove along with backup-ed config files 5sudo pacman -Rsu …
Read MoreNginx.org maintains a repository for Ubuntu. We can use this repository to install the latest version of Nginx. First off, let's create a repository source file for Nginx with the following command. 1vim /etc/apt/sources.list.d/nginx.list Paste in the following two lines to the file: 1deb [arch=amd64] …
Read MoreValue Description application/json Indicates that the request body format is JSON. application/xml Indicates that the request body format is XML. application/x-www-form-urlencoded Indicates that the request body is URL encoded. In some scenarios, for example, when we are going to send POST requests from a …
Read MoreHow to Build a CI/CD Pipeline on CircleCI
Mar 11, 2020Once you got your account on CircleCI and setup your project linked to your git repository, you will have to have a directory named “.circleci” inside the root of your project repo. Create a file named “config.yml” in there. Grab the sample script given by CircleCI platform according to your project type. The first …
Read MoreLet’s say one of your micro services is running on http://localhost:3000 If you already have a nginx service running on the server, create a server block like this: 1vim /etc/nginx/sites-available/domain.com.conf Grab this content to paste in: 1server { 2 3 server_name domain.com; 4 5 root /var/www/html; 6 index …
Read MoreHow to Use Git Rebase in a Practical Situation
Feb 24, 2020Let’s say there are two pull requests open on a project repository. Each change has its own branch like this: master feature/add-base64-endpoint feature/add-user-agent-endpoint The challenge is to use git rebase to add both changes to master. When you finished, your master branch should have three commits in the …
Read MoreHow to Enable Login With Password on Linux
Feb 18, 2020Let’s update the Password Authentication parameter in the ssh service config file: 1vim /etc/ssh/sshd_config Hey, what? You can't even find the sshd service? Install it then: 1sudo apt update 2sudo apt install openssh-server In the /etc/ssh/sshd_config file, uncomment this line: 1#PasswordAuthentication yes Boom! Done. …
Read MoreHow to Update Apt Repository on Kali Linux
Feb 18, 2020Back up the current sources.list first. 1sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup Well, run this command then. 1sudo echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list Now you can run apt update command! Happy networking! 😎
Read MoreHow to Dockerize a Full Stack MEVN Application
Feb 15, 2020First things first. Let’s check the directory structure of the app. A Full Stack MEVN Application Let’s take a look into the DB image first. 1FROMmongo:latest23WORKDIR/app4COPY . /app56ENV MONGO_INITDB_ROOT_USERNAME=root 7ENV MONGO_INITDB_ROOT_PASSWORD=password 8 9EXPOSE27017I thought importing dump data should be …
Read More