Skip to content

Instantly share code, notes, and snippets.

Mizan Rahman mizanRahman

Block or report user

Report or block mizanRahman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .vimrc
source ~/.vim_runtime/vundle_plugins
set runtimepath+=~/.vim_runtime
set number
set relativenumber
source ~/.vim_runtime/vimrcs/basic.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
mizanRahman /
Last active Sep 15, 2018
one liner scripts

kill process by port. can be defined as an alias

lsof -i :8080 | awk '{l=$2} END {print l}' | xargs kill

Output an arbitrary number of open TCP or UDP ports in an arbitrary range

comm -23 <(seq "$FROM" "$TO") <(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep "[0-9]\{1,5\}" | sort | uniq) | shuf | head -n "$HOWMANY"
package com.example.kpcat;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
public class UniqueRandomNumberGeneratorImplV2 implements UniqueRandomNumberGenerator {
private SecureRandom random;
public UniqueRandomNumberGeneratorImplV2(SecureRandom random) {
this.random = random;
import requests
services = (
("", 'POST'),
("", 'POST'),
("", 'POST'),
("", 'POST'),
("", 'POST'),
("", 'POST')
#!/usr/bin/env python
import urllib2
import json
url = "http://localhost:8080/api/metrics"
res = urllib2.urlopen(url).read()
json_res= json.loads(res)
print json_res['threads']
mizanRahman / error_code_diff.gradle
Created Aug 11, 2018
finds new properties added in from file
View error_code_diff.gradle
def sourceProps = new Properties()
def destProps = new Properties()
def diffProps = new Properties()
file("").withInputStream { sourceProps.load(it) }
file("").withInputStream { destProps.load(it) }
task diff {
doFirst {
def sourceKeys = sourceProps.stringPropertyNames();
mizanRahman /
Created Jun 22, 2018
install network time server agent
yum install ntp
chkconfig ntpd on
service ntpd start
mizanRahman /
Created Jun 22, 2018
network analysis
# tcpdump standard
sudo tcpdump -nvvv -i any -c 20 'port 9090'
mizanRahman /
Last active Jan 5, 2018
packages required to install odoo in ubuntu
sudo apt-get install libxml2-dev libxslt1-dev
sudo pip install lxml
sudo apt-get install libjpeg-dev
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
You can’t perform that action at this time.