Profile cover photo
Profile photo
Abhijeet Rastogi
328 followers
328 followers
About
Abhijeet's posts

Post has attachment

Post has attachment
Logstash+Elasticsearch: Best way to handle JSON arrays
Before I start with the solution, let's review what's the problem we're trying to solve here. If we have these two JSON documents pushed to ES:- {
"test": {
"steps": [{
"response_time": "100"
}, {
"response_time":...

Post has attachment
Monitoring Raspberry Pi using my DigitalOcean VPS
So, this is a simple one and just felt like sharing in case someone wants to save time writing those one-liners. I had a faulty raspberry pi power supply and my Rpi used to hang unexpectedly. Here is what I did to monitor uptime of my Rpi. Host a simple tex...

Post has attachment
Golang: Creating HTTPS connection via proxy
I'm writing this post because I had to read a bit of golang code to figure out how to go about doing this. User familiar with crypto/tls/  will notice that there's already a function available to establish a TLS connection, tls.Dial . However, it doesn't ha...

Post has attachment
Code Snippet: A redirection service in Go
Recently, I've been very fascinated with Go. That language is so easy to write and as it's statically compiled, less changes of bugs too. So, I keep finding excuses to write Go code. I needed a service to redirect clients which runs inside a docker containe...

Post has attachment
Fetch certificate information from a live endpoint in Go
I generally try to post snippets on my blog that I don't find on a Google search. This is like one of those snippets. This sample code fetches the time to expiry for a certificate that's currently deployed at a live endpoint.  Code:- package main

import (
...

Post has attachment
Accessing individual files from a "dd backup" of a encrypted hard disk/partition
Whenever I do something risky with my laptop like resizing partitions, I always do a full backup of the hard disk by running: dd if=/dev/sda of=/path/to/backup/directory/image.img bs=4M from a live archlinux USB pendrive. Restoring from a backup like that i...

Post has attachment
veth pair: How to know what interfaces are connected by a veth pair?
Here is a quick one. Couldn't find a direct solution on Google. You can find out what's the peer of a interface by issuing the command: [root@compute-1 ~]# sudo ethtool -S int-br-ex
NIC statistics:
peer_ifindex: 55
[root@compute-1 ~]# ip link | grep 5...

Post has attachment
Use j,k keys to navigate clipboard history in parcellite or all gtk applications
I'm a parcellite clipboard manager fan. It's clean, it's simple and it's lightweight. I use it all the time to search my clipboard history and select past clipboard entries. But, I always used to get annoyed by having to use "Up", "Down" arrow keys to navig...

Post has attachment
Wait while more posts are being loaded