Ubuntu: Loading Photos from Nikon D3300 DSLR Camera

I had some trouble loading photos from my Nikon D3300 camera. I had the USB cable, which came with and connected my PC to it. The camera was on. I use Xubuntu. My file manager is Thunar. The camera would appear in the file manager. Whenever I would try to browse the files in the camera, Thunar would freeze. gvfsd-ghoto2 would use up a huge chunk of the CPU. I would then have to close Thunar and try again. This happened everytime. If you are experiencing the same problems. Mys suggestion is to not use Thunar, but to download gtkam. It’s a GUI for gphoto2. You can of course simply use the gphoto2 CLI if you want. Photo by Javler Martínez How to install gtkam: ...

February 10, 2018 · Updated: April 9, 2021 · 1 min · Kevin Kivi

cPanel: Listing all non-self-signed certificates

I made a bash script listing all non-self-signed certificates (for certain user by username or domain or for all users) in cPanel. Usage: lrcert [OPTION] [INPUT] Example: lrcert [cPanel username] Options: -d [domain] Displays all certificates of the owner of the domain. -a, --all Lists all certificates of all cPanel users -v, --version Displays version. -h, --help This help page. GitHub: https://github.com/nake89/lrcert/

February 10, 2018 · Updated: April 9, 2021 · 1 min · Kevin Kivi

Echoing multiline in linux terminal

There are at least three fun ways to echo multiline to a file. We are going to look at doing the output twice, the heredoc -method and writing multiline using double quotes. 1. Output twice I think this is the simplest and most intuitive method if you are familiar with linux output redirection. user@server:~/projects/blog\_content$ echo "This file is" >> multiline.txt user@server:~/projects/blog\_content$ echo "multiline" >> multiline.txt user@server:~/projects/blog\_content$ cat multiline.txt This file is multiline 2. Heredoc -method You can replace EOF with your choice of characters. It denotes the ending of your input. ...

February 3, 2018 · Updated: April 9, 2021 · 1 min · Kevin Kivi

PHP: Namecheap.com API Class

I built a simple to use class in PHP for the namecheap.com API. It supports all of Namecheap’s API methods. I released the code on GitHub. Example of usage: <?php require 'namecheap.class.php'; $username = 'YOUR USERNAME'; $apiKey = 'YOUR API KEY'; $clientIp = 'IP WHERE THIS YOUR SCRIPT IS HOSTED'; $namecheap = new Namecheap ($username, $apiKey, $clientIp) ; $data\["Command"\] = "namecheap.ssl.getList"; $returned = $namecheap->request($data); print\_r($returned) ?> GitHub release: https://github.com/nake89/namecheap

May 16, 2017 · Updated: April 9, 2021 · 1 min · Kevin Kivi

End Bash Script Loop

Sometimes when bash scripting you might want the ability to cancel your script’s loop with CTRL-C. Below is an exampl simple script which loops through a file of domains separated by line break and it digs the A record (IP address) of the domain. Read further to learn how to force quit this script. #!/bin/bash while read p; do dig $p A +short done <listofdomains.txt If your list of domains is large your and you want to quit this script, you cant. Pressing CTRL-C will not work. You need to add trap "echo Script ended; exit;" SIGINT SIGTERM to the beginning of your script. E.g. ...

May 3, 2017 · Updated: April 9, 2021 · 1 min · Kevin Kivi

Reverse of hostname's IP

Are you tired of typing host domain.tld and then typing host 123.123.123.123 just to be able to get the reverse of the ip of the hostname you’re interested in. I know I am. Here is my node.js commandline application as a solution for that problem. This software requires node.js to run, which you can download here: https://nodejs.org/en/download/ Installation npm i fore-cli -g Usage fore domain.tld Example # fore kevinkivi.com hel1-77-86-179-68.ext.nebulacloud.fi GitHub repository: https://github.com/nake89/fore ...

April 23, 2017 · Updated: April 9, 2021 · 1 min · Kevin Kivi

Fix Certificate error with wget

So, you are unable to download from https sources with wget. Instead you get the following error. ERROR: The certificate of \`www.google.com' is not trusted. ERROR: The certificate of \`www.google.com' hasn't got a known issuer. No problemo. This error is most likely occurring for missing root certificates. Simply install the ca-certificates package: sudo apt-get install ca-certificates This should work on Ubuntu and Debian derivatives.

April 22, 2017 · Updated: April 9, 2021 · 1 min · Kevin Kivi

How to Search Contents of File in Linux

This is something you need to do often for one reason or another. Maybe you have a bunch of text files, which have been named horribly and you have no idea which file has the thing you are looking for, but you happen to remember a word in that file. Or maybe you need to find which file contains a certain variable to find the root cause of an error you are experiencing in your script. ...

April 15, 2017 · Updated: April 9, 2021 · 1 min · Kevin Kivi

How to pass command-line arguments in node.js

So you want to pass information to your program. This can be quite easily achieved. The arguments are contained in process.argv. arg.js console.log(process.argv[0]); console.log(process.argv[1]); console.log(process.argv[2]); console.log(process.argv[3]); console.log(process.argv[4]); Testing the code: nake89@debian:~/nodeprojects/soacomp$ node arg.js what is this /home/nake89/.nvm/versions/node/v6.10.2/bin/node /home/nake89/nodeprojects/soacomp/arg.js what is this So the first line is the location of your node executable and the second one is the location of the script. These are largely unnecessary which is why the following script is so popular. It strips away the first to results of the array. ...

April 15, 2017 · Updated: April 9, 2021 · 1 min · Kevin Kivi

Installing Vim UltiSnips on Debian 7 Wheezy

I had some problems recently installing UltiSnips on my Debian Wheezy. The first problem is that the Vim which comes with Debian does not come precompiled with Python, which UltiSnips needs. The second problem is that the version of the Vim is too old and is unsupported by UltiSnips. First uncomment or add the following line to your /etc/apt/sources.list. This is because the version of Vim in the default repository is too old. You can read more about backports here. ...

April 15, 2017 · Updated: April 9, 2021 · 1 min · Kevin Kivi