Sword and Signals
ARCHIVETALKSABOUT
  • How to migrate an AWS EC2 instance from IPv4 to IPv6

    Jan 28, 2024 About 3 mins

    With AWS’s decision to charge for public IPv4 addresses starting February 1, 2024, many users are looking for ways to avoid the new cost. This article guides you through the process of assigning an IPv6 address to your Amazon EC2 instance and removing the IPv4 address to prevent incurring charges. Check IPv6 Support Before making any changes t... Read More

    #software#knowmatic
  • Why is my JVM's max heap size less than -Xmx?

    Aug 31, 2021 About 10 mins

    TL;DR Because Max heap size = -Xmx - max possible Survivor Space size (with Parallel Garbage Collector, one of the two Survivor Spaces always needs to be empty, so objects can be copied into it during GC). The same question is also answered more concisely in this Stack Overflow post. How we got here Some time ago at work, I was looking into the... Read More

    #jvm#software
  • Solving probability problem with code

    Feb 23, 2021 About 5 mins

    The Problem Last weekend, as I was casually browsing the CS:GO subreddit for any news related to the game, I found myself in a staring contest with a math problem: Question: A player is holding a Desert Eagle and facing an enemy. Each shot he fires has 50% chance of hitting the enemy. If the shot is accurate, there’s also a 20% chance of hea... Read More

    #software
  • Effectively read logs using vanilla vim

    Jan 10, 2021 About 4 mins

    TL;DR Glance over the gifs below for tips. Preface As with the motivation for my previous post, I often need to read logs in remote machines or containers. Rather than trying to copy the files to my local computer, it’s easier to open and browse them directly in the remote shell using vim. This article showcases some vanilla vim features (i.e.... Read More

    #vim#software
  • 5 lines I put in a blank .vimrc

    Dec 13, 2020 About 2 mins

    TL;DR To make a default Vim installation more useful, type the following 5 lines into its .vimrc file: set hls set ic set is set nu set noswf Or if you prefer, copy and paste the spelled out and annotated version: set hlsearch " highlight all search results set ignorecase " do case insensitive search set incsearch " show incremental s... Read More

    #vim#software
  • All5
  • jvm 1
  • knowmatic 1
  • software 5
  • vim 2
Copyright 2024 @Jianneng Li
Powered by Jekyll & Yat Theme.
Subscribe via RSS