How to place a watermark in the corner of an image with ImageMagick.

ImageMagick(1) can be used to put a watermark on an image easily. The command below will place a TV styled watermark on an image in the lower left corner. This is very useful to watermark images you place on the Internet. convert pripyat.jpg ABCTV2005.png -gravity southeast -composite output.pngconvert pripyat.jpg ABCTV2005.png -gravity southeast -composite output.png The … Read more

Very useful Linux shell tips and tricks.

Add a new directory to the PATH to allow running an application from it without typing the full path every time you wish to run it. PATH=$PATH:/usr/local/binPATH=$PATH:/usr/local/bin Or you may have something like this in your .bashrc to add this every time you log in. PATH="/home/jason/perl5/bin${PATH:+:${PATH}}"; export PATH;PATH="/home/jason/perl5/bin${PATH:+:${PATH}}"; export PATH; This can also be set … Read more

Very useful resources for learning penetration testing and Linux commands.

CysCA hacking challenge penetration testing results, how students overcame a few vulnerable network servers and successfully captured flags. Students Write-ups. A number of write-ups submitted by the students on the day, this is a document of their solutions for the challenge. https://www.cyberchallenge.com.au/pdf/CySCA2018-Students.pdf. Active Defense pentest. https://www.cyberchallenge.com.au/pdf/CySCA2018-Active_Defence_Questions.pdf. These resources might give you some pointers when tasked … Read more

How to edit the all.spawn in Shadow of Chernobyl to add alternate music to a radio.

Editing the all.spawn in Shadow of Chernobyl is fun, this allows the modder to change the game in many ways. I edited it to add alternate music to the radio in Sidorovitch`s bunker. Use the S.T.A.L.K.E.R. *.spawn compiler/decompiler to work with all.spawn files. This is the existing entry for the radio. I changed it to … Read more

Export a database from MySQL when it is using the secure file privilege setting.

MySQL can be a pain to use when it is is running with the –secure-file-priv option and it cannot export a database to your home folder. But there is a way around this. Execute this query in MySQl. 4.4 Mon Aug 19 jason@Yog-Sothoth 0: $ mysql -uroot -p Enter password: Welcome to the MySQL monitor. … Read more

Fun with sed on Linux.

The sed command can be used to reverse text. This is a very interesting feature. Provide a text string, and it will be reversed. jason@jason-Virtual-Machine:~$ sed ‘/\n/!G;s/\(.\)\(.*\n\)/&\2\1/;//D;s/./Hello. /’ <<< ‘This is a long sentence in reverse. This is a lot of fun.’ Hello. .nuf fo tol a si sihT .esrever ni ecnetnes gnol a si … Read more

Get information about users on your Linux system easily.

A Linux system can have a lot of users in the /etc/passwd file. But it is easy to keep track of your users with the command line. The lslogins command will print a listing of known users on your Linux system. An example of the usage. jason@jason-Virtual-Machine:~$ lslogins UID USER PROC PWD-LOCK PWD-DENY LAST-LOGIN GECOS … Read more

How to extract the files from a GTK 3.0 gresource file to allow theme editing.

The themes for GTK 3.0 are packaged in a gtk.gresource file that contains .css and other files for the theme. I do not understand why, but I have figured out how to extract the files on Ubuntu 19.04. The gresource utility allows the listing of files in a gtk.gresource file. jason@jason-Virtual-Machine:~/.themes/Yaru/gtk-3.0$ gresource list gtk.gresourcejason@jason-Virtual-Machine:~/.themes/Yaru/gtk-3.0$ gresource … Read more

How to fix the annoying narrow Firefox scrollbar on Ubuntu.

The Firefox scrollbar is very narrow on Ubuntu. This is very annoying. But since I am using the MATE desktop and GTK 3.0, I can fix this easily. Add this line to the ~/.config/gtk-3.0/settings.ini file, and this will force Firefox to use the scrollbar defined by the theme instead. gtk-primary-button-warps-slider=falsegtk-primary-button-warps-slider=false The file should look like … Read more

Windows still having issues with updates in 2019.

Linux and Windows are continually in a state of competition, but the problem with Windows 10 is the update methods that create many and varied problems that should never even happen in the first place. The Linux and Macintosh operating systems do not have that many problems when upgrading. I have updated Macintosh OS to … Read more

Overlay two videos on top of another with ffmpeg.

Overlaying two other video files on to another is very easy with ffmpeg. I had two video files that are 640×360 pixels, and one that is 1920×1080. I used this command line with ffmpeg to overlay them. ffmpeg -i controller_agroprom.mp4 -vf "movie=dbz120.mp4 [a]; movie=dbz121.mp4 [b]; [in][a] overlay=0:32 [c]; [c][b] overlay=0:448" out99.mp4ffmpeg -i controller_agroprom.mp4 -vf "movie=dbz120.mp4 … Read more

Play movies with mpv and scale the output to a certain size.

The mpv media player can scale the output, just as mplayer does. This can be useful. Use this parameter to scale the video. -vf scale=960:720-vf scale=960:720 This is how this is done. This will scale the output to 960×720 pixels. 4.4 Mon Jul 08 jason@Yog-Sothoth 0: $ mpv -vf scale=960:720 olr_2_5_controller.mp44.4 Mon Jul 08 jason@Yog-Sothoth … Read more

Very useful .vimrc file for Linux users.

A very nice .vimrc file for any Linux user, this makes VI or VIM easier to use. " ~/.vimrc (configuration file for vim only) " skeletons function! SKEL_spec() 0r /usr/share/vim/current/skeletons/skeleton.spec language time en_US if $USER != ” let login = $USER elseif $LOGNAME != ” let login = $LOGNAME else let login = ‘unknown’ endif … Read more