Skip to content

Instantly share code, notes, and snippets.

Prashanth Babu P7h

Block or report user

Report or block P7h

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
@P7h
P7h / tmux_vs_screen.md
Last active Oct 16, 2019
tmux vs screen commands
View tmux_vs_screen.md

tmux vs. screen commands


Action tmux screen
start a new session tmux
tmux new
tmux new-session
screen
start a new session with a name tmux new -s name screen -S name
re-attach a detached session tmux attach
tmux attach-session
screen -r
re-attach a detached session with a name tmux attach -t name
tmux a -t name
screen -r name
re-attach an attached session (detaching it from elsewhere) tmux attach -d
tmux attach-session -d
screen -dr
@P7h
P7h / IntelliJ_IDEA__Perf_Tuning.txt
Last active Oct 12, 2019
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
View IntelliJ_IDEA__Perf_Tuning.txt
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@P7h
P7h / jdk_download.sh
Last active Sep 12, 2019
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
View jdk_download.sh
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@P7h
P7h / tmux__CentOS__build_from_source.sh
Last active Sep 6, 2019
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
View tmux__CentOS__build_from_source.sh
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@P7h
P7h / ReadPropertiesWithGuava.java
Last active Sep 5, 2019
Load a properties file using Guava.
View ReadPropertiesWithGuava.java
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Properties;
import com.google.common.io.ByteSource;
import com.google.common.io.Resources;
/**
* Reads a properties file and print all the key value pairs to the console.
@P7h
P7h / Install_7zip_on_Linux.md
Last active Sep 4, 2019
7zip install on Linux -- Ubuntu and Fedora or CentOS / RHEL
View Install_7zip_on_Linux.md

Steps to install 7zip on Linux » Ubuntu and Fedora or CentOS / RHEL

Ubuntu

cat /etc/*release
sudo apt-get update -yqq
sudo apt-get install -yqq p7zip-full
@P7h
P7h / Bash_command_line_shortcuts.md
Created Sep 13, 2016
Bash command line Shortcuts
View Bash_command_line_shortcuts.md

Bash command line Shortcuts

Picked these from here

Command Editing Shortcuts

Command Note
Ctrl + a go to the start of the command line
Ctrl + e go to the end of the command line
Ctrl + k delete from cursor to the end of the command line
@P7h
P7h / tmux-cheatsheet.md
Last active Feb 7, 2019 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
View tmux-cheatsheet.md

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View tmux.cheat
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@P7h
P7h / setup_spark_env.sh
Last active Jan 16, 2019
Download and setup [from the command line] Java, Scala, SBT and Spark on a Ubuntu machine.
View setup_spark_env.sh
### This script downloads and sets up the following binaries.
## Java: 8u91
## Scala: 2.11.8
## SBT: 0.13.11
## Spark: 1.6.1
sudo usermod -a -G sudo hduser
## Install the essential packages.
sudo apt-get install ssh zip p7zip p7zip-full multitail htop screen tmux -y # subversion git python-pip
You can’t perform that action at this time.