Skip to content

Instantly share code, notes, and snippets.

View MuruganChandrasekar's full-sized avatar

Murugan Chandrasekar MuruganChandrasekar

View GitHub Profile
Install Python 3.7.0 on CentOS/RHEL 7
1.Requirements:
yum install gcc openssl-devel bzip2-devel
2.Download Python 3.7:
cd /usr/src
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
@MuruganChandrasekar
MuruganChandrasekar / smb.conf
Created July 20, 2023 11:03 — forked from JBlond/smb.conf
smb tuning Windows 10
[global]
read raw = Yes
write raw = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384
protocol = SMB3
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@MuruganChandrasekar
MuruganChandrasekar / kvm-copy-paste.md
Created February 6, 2023 17:26 — forked from hakonhagland/kvm-copy-paste.md
How to make copy&paste work between Ubuntu host and Windows 10 guest for a KVM virtual machine?
# WELCOME TO SQUID 2.7.STABLE9
# ----------------------------
#
# This is the default Squid configuration file. You may wish
# to look at the Squid home page (http://www.squid-cache.org/)
# for the FAQ and other documentation.
#
# The default Squid config file shows what the defaults for
# various options happen to be. If you don't need to change the

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@MuruganChandrasekar
MuruganChandrasekar / .colors
Created April 14, 2022 07:18 — forked from daytonn/.colors
Bash Color functions
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
@MuruganChandrasekar
MuruganChandrasekar / update-git.sh
Created March 10, 2022 13:53 — forked from YuMS/update-git.sh
Update git to latest version on Ubuntu
#!/bin/bash
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
@MuruganChandrasekar
MuruganChandrasekar / regexCheatsheet.js
Created December 16, 2020 08:29 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@MuruganChandrasekar
MuruganChandrasekar / iptables_rules.sh
Created December 9, 2020 13:29 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP