Skip to main content

Posts

Showing posts from November, 2018

Getting Camera to work on Raspberry Pi with Just Terminal Access

Here is a simple guide to get started on Raspberry Pi Camera with just though ssh. Access through ssh ssh pi@<Pi's IP> Install $ sudo apt-get install python-picamera $ sudo apt-get install python3-picamera Enable Camera $ sudo raspi-config Interfacing options -> Camera -> Enable Create the Python script: $ touch test.py $ nano test.py paste one of the following: Camera sample code from picamera import PiCamera from time import sleep camera = PiCamera ( ) camera . start_preview ( ) sleep ( 10 ) camera . stop_preview ( ) Video Sample code camera . start_preview ( ) camera . start_recording ( '/home/pi/video.h264' ) sleep ( 10 ) camera . stop_recording ( ) camera . stop_preview ( ) $ python test.py Copy the file over to host $ scp <video or image file> <host user name>@<hosts's IP>:<host destination folder> The video file can be played through VLC.

Getting Used to tmux!

This is a short guide to multiplexing in your terminal! Installation Install  $ sudo apt install tmux launch $ tmux Core Commands Here is a small list of the most useful set of commands. Just remember these and you shall be tmuxing around in no time! Adding panes Add panes vertically ctl + b % Add panes Horizontally ctl + b "  Moving around panes Move to the panes to the right ctl + b <Right> Move to the panes to the left ctl + b <LEFT> Move to the panes to the up ctl + b <UP> Move to the panes to the down ctl + b <DOWN> Closing Window  Close current panes ctl + d Tip!!! You can resize panes by pressing: $ ctl + b + <arrow button> Scroll: $ ctl + b [ press < UP > or < DOWN > Quit $ q  

Disabling and Enabling Animation Effects in Ubuntu!

Window animation effects provide a nice and pleasant feel when using a desktop environment. At the same time, it is also end up hogging resources. So here are the terminal commands to enable and disable them! Enable $ gsettings set org.gnome.desktop.interface enable-animations true Disable $ gsettings set org.gnome.desktop.interface enable-animations false

Setting up SSH Keys for Git Account

Here is a simple guide to Generate ssh key: $ ssh-keygen just enter or say yes for every questions Enter your public key into your git account: cat ~/.ssh/id_rsa.pub Paste all the content of the file to the designated git account. The place where to put it may differ depending on what you are using (e.g. gitlab, github, etc...)  Tip: Almost all of them will be around the settings page of the git account Done!