Blog
About
  • Git Cheatsheet - 2021

    Dec 4, 2020

    Creating 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 More
  • Podman Basic Notes

    Nov 7, 2020

    Playing 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 More
  • Kubernetes Basic Notes

    Nov 7, 2020

    Kubectl 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 More
  • How to Make a Swap Space Using a Swap File in Linux

    Oct 6, 2020

    This 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 More
  • GPG Key in Git - Get Verified Your Every Commits

    Oct 4, 2020

    This 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 More
  • Hugo - An Awesome Way to Enjoy Your Blog Life as an Engineer

    Sep 23, 2020

    I'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 More
  • Deploy Your Web Apps in Just a Minute - Made With 💖 for Dockerists

    Sep 7, 2020

    As 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 More
  • How to Install Docker Engine (Not a Legacy Version!) on Ubuntu Bionic or Focal

    Jun 11, 2020

    In 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 More
  • How to Use Jenkins - A Basic Way of Deployment Automation for Lazy Developers

    Jun 11, 2020

    I 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 More
  • Let's Encrypt - A Right Way in 2020

    Jun 11, 2020

    Today 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 More
  • How to Install Golang on Manjaro

    May 22, 2020

    Manjaro 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 More
  • How to Install Vmware-Tools on Manjaro - an Awesome Distro of Arch Linux

    Apr 23, 2020

    As 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 More
  • How to Install The Latest Version of Nginx on Ubuntu Bionic

    Apr 7, 2020

    Nginx.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 More
  • How to Handle "Content-Type" in a Post Request Header

    Mar 13, 2020

    Value 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 More
  • How to Build a CI/CD Pipeline on CircleCI

    Mar 11, 2020

    Once 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 More
  • How to Setup a Nginx Reverse Proxy With Let's Encrypt for Microservices

    Mar 11, 2020

    Let’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 More
  • How to Use Git Rebase in a Practical Situation

    Feb 24, 2020

    Let’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 More
  • How to Enable Login With Password on Linux

    Feb 18, 2020

    Let’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 More
  • How to Update Apt Repository on Kali Linux

    Feb 18, 2020

    Back 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 More
  • How to Dockerize a Full Stack MEVN Application

    Feb 15, 2020

    First 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
    • ««
    • «
    • 1
    • 2
    • »
    • »»

Crazy Optimist

Crazy Optimist, Software Engineer
Read More

Featured Posts

  • How to Make a Swap Space Using a Swap File in Linux
  • How to Setup a Nginx Reverse Proxy With Let's Encrypt for Microservices

Recent Posts

  • Git Cheatsheet - 2021
  • Podman Basic Notes

Categories

DEVOPS 22 SERVER 7 LINUX 4 DOCKER 3 GOLANG 2 API 1 CICD 1 KUBERNETES 1 NODEJS 1 PODMAN 1

Copyright © 2021 CRAZY OPTIMIST. All Rights Reserved