Featured Article

bits of code

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 usernames and permissions in your spreadsheet, importing that and iterating through as… Read More »

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

Generate self-signed certificate with openssl

To generate self-signed certificate for a quick test or for development. If you are looking for getting certificate for production site then I strongly suggest to go for a proper certificate like LetsEncrypt. You can get it easily with certbot. To generate a self-signed SSL certificate using the OpenSSL, complete the following steps: Write down… Read More »

Extract data from postgres in docker and save it to csv

The case is simple postgres database is hosted in a docker image and to access the database use this command. docker image name can be found with this command docker ps -a. docker exec -it <docker-image> psql -U postgres docker exec -it <docker-image> psql -U postgres -a <dbname> -c “copy(select u.name user_name,p.name place_name, attempts,p.created fromplace… Read More »