To easily split (or cut some part) of video using command line, a tool called ffmpeg can be used.
$ sudo apt -y install ffmpeg
$ ffmpeg -i mymovie.mp4 -ss 00:01:00 -t 00:00:30 myeditedmovie.mp4
Linux is for everybody. Lets enjoy it.
To easily split (or cut some part) of video using command line, a tool called ffmpeg can be used.
$ sudo apt -y install ffmpeg
$ ffmpeg -i mymovie.mp4 -ss 00:01:00 -t 00:00:30 myeditedmovie.mp4
There is a project in github, that contain a script to easily accomplish this task. The project is called wifi-qr by kokoye2007. It can be cloned here.
To use the script, we need to clone the project from github.
$ git clone https://github.com/kokoye2007/wifi-qr
Once cloned, go into the project directory.
$ cd wifi-qr
To scan a QR code, and connect to the wifi information contained in the code
$ ./wifi-qr s
A camera interface will be displayed. Show our wifi QR code to the computer's webcam, and the script will read the QR code and automatically connect to the wifi using the information in the QR code.
Apart from scanning QR code and connecting to the wifi, this script has a lot more functions. You can read about all the functions here. Thank you to kokoye2007 for this excellent tool.
The openssl program is a command line tool for using the various cryptography functions of OpenSSL's crypto library from the shell.
To install openssl in ubuntu or debian:
$ sudo apt install openssl -y
To install openssl in RHEL, CentOS or Fedora:
$ sudo yum install openssl -y
To install custom upstart script, please follow below steps (in this example, I'll be using a service call cat):
$ initctl reload-configuration
$ initctl list | grep cat
cat stop/waiting
$ service catstatus cat stop/waiting
$ service cat start * Starting cat .... [OK]
$ service cat stop * Stopping cat .... [OK]
.deb files are regular ar archives. You can manipulate the file by using ar command.
For example, I have a package called lynx_2.8.8dev.15-2_all.deb in a centos box.
$ cat /etc/issue CentOS release 6.4 (Final) Kernel \r on an \m $ ls -lh
total 4.0K
-rw-rw-r--. 1 foo foo 3.9K Jan 18 2013 lynx_2.8.8dev.15-2_all.deb
$ ar x lynx_2.8.8dev.15-2_all.deb
You will see 3 files being extracted, control.tar.gz, data.tar.gz and debian binary.$ ls control.tar.gz data.tar.gz debian-binary lynx_2.8.8dev.15-2_all.deb
$ cat debian-binary 2.0
$ tar -tf control.tar.gz ./ ./md5sums ./control ./preinst
$ tar -tf data.tar.gz ./ ./usr/ ./usr/share/ ./usr/share/doc/ ./usr/share/doc/lynx/ ./usr/share/doc/lynx/copyright ./usr/share/doc/lynx/changelog.Debian.gz
To setup ip for debian or ubuntu server is not easy for someone who is not familiar with command line. For normal ubuntu desktop user, there is always NetworkManager applet to easily set up the network using GUI, which is very easy. There are 2 ways to setup ip for debian or ubuntu server. One will set the ip temporarily and the otehr one will permanently set the ip. I will show both :)
To set ip temporarily using ifconfig and route commands
1. Run the command below to set ip and netmask
$ sudo ifconfig eth0 10.20.1.10 netmask 255.255.255.0 up
where eth0 is the name of the interface, 255.255.255.0 is the netmask and up to activate the interface
2. run route command to set default gateway
$ sudo route add default gw 10.20.1.1
where 10.20.1.1 is your gateway ip
3. You can check the configuration that you have setup using commands route -n to see the gateway and ifconfig to see the ip address
Done.
To permanently set up the ip and gateway, you have to edit /etc/network/interfaces. It is advisable if you backup the existing interfaces file, if it is available.
1. Backup /etc/network/interfaces
$ sudo cp /etc/network/interfaces /etc/network/interfaces.bak
2. Open the /etc/network/interfaces using your favorite text editor
$ sudo vi /etc/network/interfaces
3. Add the below setting to add ip, netmask and gateway
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
#set your static IP below
address 10.20.1.10
#set your default gateway IP here
gateway 10.20.1.1
# set your netmask, network and broadcast ip below
netmask 255.255.255.0
network 10.20.1.0
broadcast 10.20.1.255
4. Save your configuration and restart network
$ sudo /etc/init.d/network restart
5. Your debian/ubuntu server machine is now operating with the new ip. Check ip and gateway using ifconfig and route -n