Posts

They all need to go after 7th of October

Image
 

List of software and apps that does not require registration and just works

List of software and apps that does not require registration and just works out of the box without too many ads and without need to registrations. The list of applications for Android and Linux desktop that just do the work they need to do. Nothing more. Nothing less. K-9 Email Mail for Android Otomusic - music mp3 player application for Android    

Writing a json to smtp email proxy in go (golang) json2smtp

Image
I wrote a json2smtp proxy server that can be self hosted in Go (golang) See here: https://www.c2kb.com/json2smtp https://github.com/caviv/json2smtp   The reason why I needed to write an email proxy was because I was called to do some maintenance on an old legacy system. This system was running on Windows Server 2012, with php version 5.5.6 and Apache 2.4. Very old versions of software. The system was sending emails using the php smtp package and old libssl.dll which supports only TLSv1.0. The smtp service they were using (AWS SES Simple Email Service) has recently dropped the support for SMTP connection via TLS version 1.0. Now in order to support TLS v1.2 for emails on smtp I have to upgrade the whole system. Windows version, php version, Apache version and more - this would have taken me a very long time with many obstacles on the way. Amazon support:  https://docs.aws. amazon.com/ses/latest/dg/ security-protocols.html The solution I have chosen was to write this ...

Taking a screenshot and creating thumbnail of webpage html as an image via command line

There are a few options to take screenshot of a webpage or save a webpage as an image on the disk via the command line. This can allow you to create a thumbnail of a web site easily by one command on the terminal.   Using chrome to save a webpage as an image: chrome --screenshot=google.png --headless --window-size=1024,768 https://www.google.com/    Using cutycapt to screenshot a webpage: https://cutycapt.sourceforge.net/   Using webkit2png to create site thumbnail: https://paulhammond.org/webkit2png   You can also use Midori browser

Linux Ubuntu Installing and Using Fake Camera Stream

If you wish to create a virtual camera in Linux and stream "fake" videos during calls: To install the loopback camera: sudo apt update sudo apt install v4l2loopback-dkms v4l2loopback-utils To add the loopback camera module: sudo modprobe v4l2loopback card_label="My Fake Webcam" exclusive_caps=1 or sudo modprobe v4l2loopback devices=1 video_nr=1 card_label='MyWebCam' exclusive_caps=1 Now to stream the video: First find the list of videos device available: v4l2-ctl --list-devices You can check the videos by playing: ffplay /dev/videoX ffplay Rick_Astley_Never_Gonna_Give_You_Up.mpg Now you can stream the video to the free one: ffmpeg -re -i Rick_Astley_Never_Gonna_Give_You_Up.mpg -map 0:v -f v4l2 /dev/videoX Or ffmpeg -stream_loop -1 -re -i video.mp4 -vcodec rawvideo -threads 0 -f v4l2 /dev/videoX To remove the module from the kernel: sudo modprobe --remove v4l2loopback Software for streaming: sudo apt-add-repository ppa:obspro...

Go (golang) howto not to export fields of a struct when Unmarshal to json object

Use: typedef MyData struct {     Data               string    `json:"data"`         FieldName   *int64   `json:"-"`  } Adding the `json:"-"` will make the Unmarshal command disregard this field

Cleaning and resizing VM VirtualBox VDI Virtual Machine Disk

 You have to do the following steps: Run defrag in the guest (Windows only) Nullify free space: With a Linux Guest run this: dd if=/dev/zero of=/var/tmp/bigemptyfile bs=4096k ; rm /var/tmp/bigemptyfile Or: telinit 1 mount -o remount,ro /dev/sda1 zerofree -v /dev/sda1 With a Windows Guest, download SDelete from Sysinternals and run this: sdelete.exe c: -z (replace C: with the drive letter of the VDI) Shutdown the guest VM Now run VBoxManage's modifymedium command with the --compact option: With a Linux Host run this: vboxmanage modifymedium --compact /path/to/thedisk.vdi With a Windows Host run this: VBoxManage.exe modifymedium --compact c:\path\to\thedisk.vdi With a Mac Host run this: VBoxManage modifymedium --compact /path/to/thedisk.vdi This reduces the vdi size. https://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size