Featured Article

bits of code

Move content of the current directory to a sub-directory excluding the sub-directory How to chroot properly. What are the devices and directories to mount To create user in kobotoolbox If you have access to the hosted server: (Additionally you can assign permissions to those users as you create them through the shell — perhaps listing… Read More »

Generate random key

A lot of applications these days need some sort of master key to enhance security. Few simple methods to generate such a key uuidgen method Run this command to generate a random 32 characters long key. Most of the OS’s should have this command if not install it. More options and methods using this command… Read More »

Generate a key for use as salt or any other form

While installing or configuring setups we may need to generate a 32 character long random keys may that be for salt or used for flask sessions or while setting up ELK stack and you need to create this key. These 2 commands will generate the desired key. If needed modify or alter the random function… Read More »

Experiments with AWK

These simple combination of commands are quite powerful. I am listing the commands that I used on some of the projects for later reference.

Update wordpress siteurl

Use this command to update site url from mysql prompt. Make sure you have the necessary permissions and access. More details can be found in the link below. Link: https://www.hostinger.in/tutorials/wordpress/how-to-change-wordpress-urls-in-mysql-database-using-phpmyadmin

Mounting nfs readyNAS share on Archlinux

First enable NFS in ReadyNAS. Follow these steps to enable NAS for a selected folder. Follow these steps to enable nfs share for the selected directory In settings go to network access tab Select nfs and switch it on and then select read/write for AnyHost and apply. After settings are applied the tab should look… Read More »

Plugging in Guitar to Archlinux

I think this method should ideally work for any guitar plugged into the system. It is just taking input from one device and sending it to an output device. pacat -r –latency-msec=1 -d alsa_input.usb-Hercules_Rocksmith_USB_Guitar_Adapter-00.mono-fallback | pacat -p –latency-msec=1 -d alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor Another interesting find. Guitarix is quite impressive and fairly easy(though not very easy, it will… Read More »

Generate Django Model graphic representation (Entity–relationship model (ERD))

Install graphviz and libgraphviz-dev before installing pip packages. Add these lines to settings.py file To generate dotfiles run this command from django prompt. This is the simplest form of generating graph for all the apps. To get image instead of dotfile run this command Links for reference https://django-extensions.readthedocs.io/en/latest/graph_models.html https://pypi.org/project/django-extensions