Probably the most important command for 60% of developers out there 🙂
sudo timedatectl set-timezone Asia/Kolkata
Probably the most important command for 60% of developers out there 🙂
sudo timedatectl set-timezone Asia/Kolkata
Glad to write about a twitter bot I had written and launched during the last Independence day – Tat Kim. For those who are not in the know, Tat Kim means “What’s that?” in Sanskrit – a very apt name for a Bot and allied service which answers questions of Sanskrit enthusiasts.
Currently Tat Kim bot can be used to read Sanskrit tweets in your own script (Eg, Malayalam or Kannada) – there by taking away the need to know how to read Hindi (or Devanagari) to be able to consume these tweets.
Sanskrit is a pan-Indian language and it should be free from the constraints of a regional Lipi like Devanagari. Also, it helps to remember that some of the seminal works in Sanskrit were recorded not in Devanagari, but in Grantha Lipi (more or less Malayalam of our times)
If you happen to find a Sanskrit tweet from your favourite Sanskrit tweeple, comment on that tweet in the below format
@TatKimBot {languageCode} Where language could be one from: en, hi, bn, gu, kn, ml, or, pa, te, ta, mr
Details of Language codes:
Code | script |
en | English |
hi | Devanagari (Kept to support translations to Hindi at a later point of time) |
bn | Bengali |
gu | Gujarati |
kn | Kannada |
ml | Malayalam |
or | Oriya |
pa | Punjabi |
te | Telugu |
ta | Tamizh (The transliterations will be lossful due to Tamil script not being elaborate enough to represent all sounds of Sanskrit) |
mr | Marathi (Kept to support translations to Marathi at a later point of time) |
Example:
@TatKimBot ml
And the bot responds in 15 seconds as in the below screenshot:
The archives of the transliterations done by Tat Kim Bot will be available at the web portal https://tat.kim
(A sample screenshot below)
Look forward to people finding and using it during the next few months!
Problem: Maven package gives this compile time error when using Open JDK.
Fatal error compiling[m: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [1m[Help 1][m
Reason: Lombok version included in the project seemingly had a dependency on Oracle JDK, which is fixed in 1.18.2
Fix: Upgrade lombok to 1.18.2 in the POM file.
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.2</version> <scope>provided</scope> </dependency>
In case a faulty script started by .bashrc or .profile is failing and crashing SSH initiation, you could still login and fix the issue by running shell directly via ssh.
The command is –
ssh -t {username}@{hostname} /bin/sh
Here are the steps I followed to get my dev instance of cassandra copied to a new server (both single node instances)
I’ve used medusa tool for the same. You can read more about it here
Install medusa on both source and destination cassandra-servers, by running the following commands on both –
curl -1sLf 'https://dl.cloudsmith.io/public/thelastpickle/medusa/setup.deb.sh' | sudo -E bash sudo apt update sudo apt-get install cassandra-medusa
#ssh into source server and do these mkdir ~/cassandra-bkup sudo cp /etc/medusa/medusa-example.ini /etc/medusa/medusa.ini sudo vi /etc/medusa/medusa.ini # Search for, and set these values in the ini file storage_provider = local base_path = /home/{username}/cassandra-bkup # Save and Exit medusa backup --backup-name=dev-db-data --mode=full #compress output folder tar -czf dev-db-bkup-tar ~/cassandra-bkup # SCP the backup directory to destination server scp -r -i <key-file> dev-deb-bkup-tar {dest-user}@{dest-server}:~/
# ssh into target serer and do these tar -xzf dev-deb-bkup-tar ls ls /home/{username}/cassandra-bkup/cassandra_backups/ #note down the folder name parallel to the folder index, let it be {sourceHostLocalName} sudo /etc/hosts #add an entry with local nodes IP and host name as {sourceHostLocalName}. #You can remove this later # save /etc/hosts and Exit Vim. sudo medusa restore-node --keyspace={keyspace of intereset} --backup-name=dev-db-data
cqlsh {targetNodeIp} desc keyspaces #verify you have the source keyspace created use {keyspaceOfInterest} desc tables; #verify all your tables in the source are recreated here.
That’s it. You should now be able to work with your new Cassandra node!
Here is a weekend hack I wrote to remind me to get up from my workstation and do some lightweight exercises during the WFH days – Fit@WFH
Some of the features are –
I guess someone else might also find tremendous value from it. So if you too are caught in a sedentary lifestyle and want to move more, go ahead – book mark and use it !
On bash, run –
sudo systemd-resolve --flush-caches
Should be done.
Problem: Changing just the datacenter name in cassandra-rackdc.properties gives the error:
Cannot start node if snitch's data center [newName] differs from previous data center [oldName]. Please fix the snitch configuration, decommission and rebootstrap this node or use the flag -Dcassandra.ignore_dc=true.
Solution:
If you are just beginning to setup you cassandra cluster, and is ok to reset the data to bootstrapped state, do this
sudo service cassandra stop sudo rm -R /var/lib/cassandra sudo mkdir /var/lib/cassandra sudo chown cassandra /var/lib/cassandra sudo service cassandra start
If you need to persist the existing data, do this
sudo vi /etc/cassandra/cassandra-env.sh
# edit the JVM_OPTS line to make it look like below
JVM_OPTS=\"$JVM_OPTS -Dcassandra.ignore_rack=true -Dcassandra.ignore_dc=true\"
sudo service cassandra restart
This should normally resolve the dc name correction in rack-dc properties file.
Error:
Setting up rabbitmq-server (3.8.16-1) … Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details. invoke-rc.d: initscript rabbitmq-server, action "start" failed.
Reason: libtinfo.so library missing.
Solution:
sudo apt install libncurses5
Note: No need to reattempt the installation.
Here is a one hour HTML app that you can use to repeat recorded audio to remind your busy kids they have to finish that food on the table, while watching their favorite videos on YouTube.
To use the app is this simple –
Happy parenting !