Sometimes it sucks when you listen to music on youtube with very limited sound level after your volume level has reached maximum and you’re using piece of shit earphone. Just go with this command to extend the limitation sound level, it works on ubuntu 14.04:
$ pactl -- set-sink-volume 0 150%
be careful with maximum sounds, can be dangerous for your ears.
To connect host with specific key
$ ssh user@host -i mykey.pem
Just a case if you want to know some application or service who is running under specific port :
$ netstat -tulpn | grep :80
Sometimes you need to run with sudo to see all services :
$ sudo netstat -tulpn | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1393/nginx.conf
It turns out that 1393 is the pid of service
docker to start a container from image
$ sudo docker run -itd --name jenkins --publish 8080:8080 --publish 50000:50000 jenkins
docker to get inside the container
$ sudo docker exec -it jenkins bash
Play video headlessly and only audio with command line :
$ mplayer -vo null myvideo.mp4
To describe specific AMI
$ aws ec2 describe-images --image-ids ami-5731123e
To describe instance
$ aws ec2 describe-instances --instance-ids i-1234567890abcdef0
To describe VPCs
$ aws ec2 describe-vpcs
To describe route tables
$ aws ec2 describe-route-tables
move to another branch
git checkout your-branch
hard reset branch
git reset --hard origin/master
create new branch
git checkout -b new-branch
delete local branch
git branch -D your-branch
merge from develop to master
git merge develop
init on existed project and push master for the first time
git remote add origin ssh://firstname.lastname@example.org/your-username/your-repo.git
git add .
git commit -am "initial commit"
git push -u origin master
I want to start my VM virtualbox but without the GUI interface, cause if I need to get the access to my VM, I just can SSH into it. So it won’t need any GUI interface and I don’t have to open up Virtualbox first to start my VM.
This is a simple command line to start up your VM in headless mode, once it gets started, you can just SSH into your VM.
VBoxManage startvm myubuntu --type headless
Poweroff your VM with command line:
VBoxManage controlvm myubuntu poweroff
Or you can just init 0 in your VM when you’re done, LOL
Easy way to save session and load it again when you open up rtorrent, so you don’t have to start over again.
Start rtorrent and set the session to some directory:
$ rtorrent -s /tmp
try to load it again:
$ rtorrent -s /tmp
Sometimes you want to know the serial of your laptop that you’re using on ubuntu, use this command:
sudo dmidecode | grep -A 9 "System Information"
sudo dmidecode -s system-product-name