8000 GitHub - Akhilkm/helps Β· GitHub
[go: up one dir, main page]

Skip to content
AkhilkmPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

71 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

helps

image compression

Internet speed test

Finding Public IP Addresses (GW) from terminal

Private IP range

SSH authetication in dockerfile automatic

Get container id within that container

unknown terminal in dockerfile solution

nfs-mounting inside a container

java installation

nano editor keys

sudo permission unauthenticated

ssh passwordless authetication

ssh passwordless and userless authetication

scp custom

Tomcat Donwload

docker env rule

ulimit

inotify watches

delete git repository tags

Locale configuration

onlline pdf editor

ASCII Online Creation

Windows Server 2012 R2 -- Free product key

github markdown emoji

Find files installed by a package

Clear RAM Memory Cache, Buffer and Swap Space on Linux

Docker sort memory usage by container

Subnet masking subnet design

windows-server-free-product-key

πŸ‘†

Once you have installed the evaluation copy you may see that it is not activated and when you try and activate, it will ask for a product key.

If you get this instead of it automatically activating for you, then all you need to do is to run the following command from an elevated command prompt:

slmgr.vbs -rearm

This should then automatically rearm your trial for 180 days. I have tested this several times, apparently you can rearm your trial version up to five times which will give you around 2 and a half years of Windows Server 2012 R2 . link

test-2-ASCII

πŸ‘†

http://patorjk.com/software/taag

pdf-editor

πŸ‘†

https://www.sejda.com/pdf-editor

Locale-configuration

πŸ‘†

export LANGUAGE="en_US.UTF-8"
echo 'LANGUAGE="en_US.UTF-8"' >> /etc/default/locale
echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale      # exit and login again
dpkg-reconfigure locales

or

echo """
LANGUAGE=\"en_US.UTF-8\"
LANG=\"en_US.UTF-8\"
LC_ALL=\"en_US.UTF-8\"
JAVA_HOME=\"/usr/lib/jvm/java-8-openjdk-amd64\"
""" >> /etc/environment

image-compression

πŸ‘†

http://jpeg-optimizer.com/

speed-test

πŸ‘†

curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -

http://www.speedtest.net

Public-IP-Addresses

πŸ‘†

Finding Public IP Addresses (GW) from terminal

dig +short myip.opendns.com @resolver1.opendns.com

curl ifconfig.me
curl icanhazip.com
curl ipecho.net/plain
curl ifconfig.co

https://www.cyberciti.biz/faq/how-to-find-my-public-ip-address-from-command-line-on-a-linux/

Private-IP-range

πŸ‘†

Class   Private Networks            Subnet Mask     Address Range
A       10.0.0.0                    255.0.0.0       10.0.0.0 - 10.255.255.255
B       172.16.0.0 - 172.31.0.0     255.240.0.0     172.16.0.0 - 172.31.255.255
C       192.168.0.0                 255.255.0.0     192.168.0.0 - 192.168.255.255

Disable-hostcheck

πŸ‘†

SSH authetication in dockerfile automatic

echo "Host github.com\n\tStrictHostKeyChecking no\n" > /root/.ssh/config

Container-ID

πŸ‘†

Get container id within that container

cat /proc/self/cgroup | grep "cpu:/" | sed 's/\([0-9]\):cpu:\/docker\///g'

UnKnown-terminal-error

πŸ‘†

error : unknown terminal in dockerfile solution

export TERM=xterm

nfs-mounting-container

πŸ‘†

nfs-mounting inside a container

give privileges for docker container "--privileged" while running the containier

java-installation

πŸ‘†

(java 1.8)

oracle-java8

apt-get update \
&& echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections \
&& apt-get install -y python-software-properties software-properties-common \
&& add-apt-repository -y ppa:webupd8team/java \
&& apt-get -y update \
&& apt-get install -y nano wget unzip locate oracle-java8-installer \
&& update-java-alternatives --set java-8-oracle \
&& apt-get install oracle-java8-set-default && java -version

OpenJDK

apt-get install openjdk-8-jdk -y

Amazon Corretto 8

apt-get update
apt-get install java-common
dpkg --install java-1.8.0-amazon-corretto-jdk_8.212.04-2_amd64.deb

https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html

nano-editor

πŸ‘†

for go to a particular line in nano edit

nano +107 filename

inside >>

(ctrl) + (shift) + (-)

sudo-permission-unauthenticated

πŸ‘†

giving user to run sudo without password

1) add a user
2) add user in sudo group
3) edit sudoer file 	# nano /etc/sudoers  or  visudo
4) add this line
username ALL=(ALL) NOPASSWD: ALL

ssh-passwordless-authetication

πŸ‘†

Setup SSH for Auto Login without a Password

On server

ssh-keygen                # this command will create a .ssh directory under home if it doent exist
ssh-copy-id  servername   # this will copy the public key to server with name of authorized_keys
chmod 600 authorized_keys

or

ssh-keygen -t rsa  # (hit return through prompts)
mv id_rsa.pub >> authorized_keys
chmod 600 authorized_keys
scp authorized_keys user@client ip:/home/ubuntu/.ssh/
check on client side and try to login from server

http://www.rebol.com/docs/ssh-auto-login.html

ssh-passwordless-userless-authetication

πŸ‘†

Setup SSH for Auto Login without a Password and without user

cd .ssh
ssh-keygen -t rsa  (hit return through prompts)
mv id_rsa.pub >> authorized_keys
chmod 600 authorized_keys

scp authorized_keys user@client ip:/home/ubuntu/.ssh/
nano .ssh/config
the public key must be provided in that user's .ssh/authorized_keys

Example 1 >>

Host  digital 
Hostname  192.168.1.234
User ubuntu 
IdentityFile /home/ubuntu/Desktop/digital

ssh digital # in here, login as ubuntu and private key taken from IdentityFile path

Example 2 >>

Host  akhil
Hostname  192.168.1.235
User root
IdentityFile /home/ubuntu/Desktop/digital

ssh akhil # in here, login as root and private key taken from IdentityFile path

http://www.beginninglinux.com/home/server-administration/openssh-keys-certificates-authentication-pem-pub-crt

scp-custom

πŸ‘†

scp with particular port

scp -r -P 2233 -i /path/to/name.pem user@ip-address:/path/to/src  /path/to/dest

Tomcat-donwload

πŸ‘†

tomcat download site

http://www-us.apache.org/dist/tomcat/

docker-env

πŸ‘†

env MYSQL_ROOT ubuntu	>> will work 		β€œ_”
env MYSQL-ROOT ubuntu	>> will not work 	β€œ-”

ulimit

πŸ‘†

https://www.linkedin.com/pulse/solution-javanetsocketexception-too-many-open-files-divyang-shah https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

inotify-watches

πŸ‘†

The user limit on the total number of inotify watches

sysctl fs.inotify
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances && sudo sysctl -p

https://github.com/facebook/watchman/issues/163

delete-repo-tags

πŸ‘†

deleting tags form repos in a sec

git tag -l
git tag -d $(git tag -l)
git fetch
git push origin --delete $(git tag -l)                # Pushing once should be faster than multiple times.
git tag -d $(git tag -l)
git tag -l

Find-files-installed-by-a-package

πŸ‘†

RPM based distro

rpm --query --list  <package-name>
eg: rpm --query --list libcgroup | less

Clear-RAM-Memory-Cache-Buffer-and-Swap-Space-on-Linux

πŸ‘†

Clear PageCache only.
sync; echo 1 > /proc/sys/vm/drop_caches

Clear dentries and inodes.
sync; echo 2 > /proc/sys/vm/drop_caches

Clear PageCache, dentries and inodes.
sync; echo 3 > /proc/sys/vm/drop_caches

Docker-sort-memory-usage-by-container

πŸ‘†

docker stats --no-stream --format "table {{.Name}}\t{{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}" | sort -k 4 -h

Subnet-Masking-define-subnets

πŸ‘†

link

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0