Suramya's Blog : Welcome to my crazy life…

September 26, 2023

Updates on the Blog’s federated presence and name change

Filed under: My Thoughts,Website Updates — Suramya @ 2:54 PM

As I had talked about in a previous post, this blog is a part of the Fediverse and all posts here get published to the Fediverse automatically. This means that you could search for @suramya@www.suramya.com on mastodon and find all my blog posts. I enabled this back in July and all was working well till yesterday which is when I noticed that my most recent post wasn’t pushed out to Mastodon.

I couldn’t figure out why so I created an issue over on the wordpress-activitypub github site highlighting the issue. I have to say I was extremely impressed with the quality of the support given for what is essentially a free plugin. I opened the ticket and 6 minutes later I had a response from Matthias Pfefferle who is the creator of the plugin and within 2 hours there was a code change warning people about this issue (more later in the blog).

It turns out that I had used a username that was previously an author-name for the blog in the settings and due to this:

the URL https://mastodon.social/@suramya@www.suramya.com redirects to https://www.suramya.com/blog/author/suramya-2/ but it should redirect to https://www.suramya.com/blog/@suramya. This is because Mastodon caches Profiles for quite some time, so all the signatures and IDs of the blog user, does not match the user, Mastodon has in the cache and so it will decline your post.

The recommendation is to not use author names for the blog, because it could mess up a lot of things due to caching. The fix is to either wait for the cache on the server to expire or use a different name for the blog-user. I decided to change the configuration so that the posts are now being pushed out as @blog to the fediverse and it looks like things are mostly back to normal. There is a rendering issue on Mastodon where it uses the HTML entity code in the blog’s name but that is a minor issue.

Another cool feature with the updated plugin is that all future blog posts will be publicly searchable on Mastodon (due to the way the Activitypub protocol works previous posts are not republished).

Well this is all for now. Will write more later.

– Suramya

July 25, 2023

Suramya’s Blog is now (hopefully) its own Federated Instance on Fediverse

Filed under: Website Updates — Suramya @ 5:45 PM

Unless I have managed to mess up something really bad, this Blog should now be a part of the Fediverse and all posts here should get published to the Fediverse automatically. If all is well, then searching for @suramya@suramya.com on a Mastodon instance should allow you to add me there and all posts (with their full text) made here should get published there automatically.

Once the ActivityPub plugin is installed, each author’s page on your WordPress blog will become its own federated instance. In other words, if you have two authors, Jane and Bob, on your website, example.com, then your authors would have their own author pages at example.com/author/jane and example.com/author/bob. Each of those author pages would now be available to Mastodon users (and all other federated platform users) as a profile that can be followed. Let’s break that down further. Let’s say you have a friend on Mastodon who tells you to follow them and they give you their profile name @janelivesheresomeofthetime. You search for her name, see her profile, and click the follow button, right? From then on, everything Jane posts on her profile shows up in your Home feed. Okay, similarly, now that Jane has installed the ActivityPub plugin on her example.com site, her friends can also follow her on Mastodon by searching for @jane@example.com and clicking the Follow button on that profile.

– Suramya

April 14, 2023

My app that autoposts to Twitter has been suspended from accessing the Twitter API

Filed under: My Thoughts,Tech Related,Website Updates — Suramya @ 5:44 PM

Yesterday I got an email from Twitter stating the following:

Hello,

This is a notice that your app – Suramya’s Blog – has been suspended from accessing the Twitter API.

Please visit developer.twitter.com to sign up to our new Free, Basic or Enterprise access tiers.

More information can be found on our developer community forums.
Regards,
Twitter Developer Platform

The email actually looks like a really bad phishing email as it has no formatting, doesn’t give any links etc and is just a plain auto-generated email. I almost deleted it as spam but then realized that it could be a notification sent because they are forcing folks to use the new plans. Today I logged in to the Developer account and I was expecting to have an option to select one of the tiers, click save (pay if I was insane and decided to pay) and would be done with it. But that is not the case. I was greeted with the following banner when I logged in:


This App has violated Twitter Rules and policies. As a result, it can no longer be accessed. For assistance, submit a support ticket.

It looks like they couldn’t figure out how to temp block users who need to select a tier before being allowed to continue so they decided to suspend the app instead using the same process as what they would do if the app was suspended for ‘violations of Twitter Rules and policies’. Which is quite amusing because the app been used 12 times in the last 2 months to autopost links to my posts here when I create them. I did use the same app for testing a Twitter export script that I wrote a few months ago but haven’t run it in a while, either.

There is no way for me to edit/choose a tier for my app and I have no interest is spending the time to create another app just to post something on Twitter which will get about 2-10 view on an average. (Usually on the lower end of the scale). This was pretty much the last remaining vestige of my posting on Twitter and I am fine with it not working anymore.. I rather spend that time doing something more productive like watching paint dry.

– Suramya

June 17, 2022

Updates to main suramya.com site in progress

Filed under: Website Updates — Suramya @ 4:15 PM

Its been a while since I last updated the main suramya.com site. So a major revamp is underway with a new look and lots of new content and articles. I am hoping to complete it in the next 2 weeks. Will update here if that changes for any reason.

– Suramya

August 26, 2020

Relaunching Suramya’s Book Review Cafe

Filed under: Books Related / Reviews,Website Updates — Suramya @ 11:15 AM

In 2010 I created a section of my website dedicated to book reviews but over the next few years that section was removed from the site. I honestly don’t remember why that happened but my best guess is that I was updating the website theme, never got around to migrating the section and then just forgot. I reviewed 71 Books during the time the site was active and looking at my logs if I had continued to review every book then I would have reviewed over 1500 books to date. 🙂

I finally revived the site over the past few days and instead of using the custom website that I had created with a bare-bones CMS system, I have switched over to WordPress as its a lot easier to manage/maintain WP sites. Migrating the old reviews was a painfully manual process where I had to export the data from the DB and then format it correctly for WordPress. Most of it I was able to automate but the Affilate links had to be manually updated and it was painful to say the least. But finally I am done and all the old reviews are imported into the updated site. Going forward I will be adding the book reviews to the site regularly.

You can access the site at: Relaunching Suramya’s Book Review Cafe.

There are some changes to the rating system that I have implemented for the reviews going forward to make the ratings easier to understand and more consistent. In the past I used a scale of 1-10 for the ratings but I will be using a scale of 1-5 (5 being the best) going forward.

Let me know if you have any questions/comments about the site or would like to give feedback on features that I should incorporate.

– Suramya

PS: This notice is duplicated on the Review site as well.

August 18, 2020

Finally moved the Website & Blog to https

Filed under: Computer Tips,Tech Related,Website Updates — Suramya @ 12:02 PM

After spending way too much time avoiding the work due I finally configured both suramya.com & the Blog to be https by default. The setup was fairly simple, I added the certificate on the 1and1.com portal, then after a few mins I was able to access the site over https. In order to redirect http to https automatically I followed the following steps:

Auto Redirect to https in Apache

Configure .htaccess to force a redirect, you can also configure it in the Apache main configuration (under the virtualhosts directive) but since I don’t have root access and can’t modify it I updated the .htaccess config to do the same thing. Basically you need to add the following lines to .htaccess :

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suramya.com/$1 [R,L]

Change www.suramya.com to your domain, else every visitor to your site will be sent to my site. Not that I will mind that, but you might. 🙂

Then I did the same thing for the blog with a small change, The .htaccess for the blog reads as the following:


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suramya.com/blog/$1 [R,L]

When updating the file, you need to ensure you put the changes outside the # BEGIN WordPress & # END WordPress as the content is dynamically generated and would be overwritten.

Updating all the urls in WordPress

After I made the changes above, I found that the site was being redirected to https but I was getting errors about mixed content on the page because all the URL’s/Images that I had uploaded to WP till now were saved as http and not https. So I had to change every URL in the blog from http to https and to be honest I wasn’t looking forward to doing this manually. I searched the web and found this site that had instructions on how to update the url’s using the WordPress commandline interface. From the blog directory you need to issue the following command:

wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/ --dry-run

This command does a dry run and tells you what all changes will be made and if everything looks ok, then you can run the above command again without the ‘dry-run’ call.

wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/

If all goes well you will get an output similar to the following:

(uiserver):~/public_html/suramya.com/blog$ wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/ 
+------------------+-----------------------+--------------+------+
| Table            | Column                | Replacements | Type |
+------------------+-----------------------+--------------+------+
| wp_commentmeta   | meta_key              | 0            | SQL  |
| wp_commentmeta   | meta_value            | 572          | PHP  |
| wp_comments      | comment_author        | 0            | SQL  |
| wp_comments      | comment_author_email  | 0            | SQL  |
| wp_comments      | comment_author_url    | 29           | SQL  |
| wp_comments      | comment_author_IP     | 0            | SQL  |
| wp_comments      | comment_content       | 2            | SQL  |
| wp_comments      | comment_approved      | 0            | SQL  |
| wp_comments      | comment_agent         | 0            | SQL  |
| wp_comments      | comment_type          | 0            | SQL  |
| wp_links         | link_url              | 0            | SQL  |
| wp_links         | link_name             | 0            | SQL  |
| wp_links         | link_image            | 0            | SQL  |
| wp_links         | link_target           | 0            | SQL  |
| wp_links         | link_description      | 0            | SQL  |
| wp_links         | link_visible          | 0            | SQL  |
| wp_links         | link_rel              | 0            | SQL  |
| wp_links         | link_notes            | 0            | SQL  |
| wp_links         | link_rss              | 0            | SQL  |
| wp_options       | option_name           | 0            | SQL  |
| wp_options       | option_value          | 3            | PHP  |
| wp_options       | autoload              | 0            | SQL  |
| wp_postmeta      | meta_key              | 0            | SQL  |
| wp_postmeta      | meta_value            | 0            | PHP  |
| wp_posts         | post_content          | 591          | SQL  |
| wp_posts         | post_title            | 0            | SQL  |
| wp_posts         | post_excerpt          | 0            | SQL  |
| wp_posts         | post_status           | 0            | SQL  |
| wp_posts         | comment_status        | 0            | SQL  |
| wp_posts         | ping_status           | 0            | SQL  |
| wp_posts         | post_password         | 0            | SQL  |
| wp_posts         | post_name             | 0            | SQL  |
| wp_posts         | to_ping               | 0            | SQL  |
| wp_posts         | pinged                | 20           | SQL  |
| wp_posts         | post_content_filtered | 0            | SQL  |
| wp_posts         | guid                  | 2775         | SQL  |
| wp_posts         | post_type             | 0            | SQL  |
| wp_posts         | post_mime_type        | 0            | SQL  |
| wp_term_taxonomy | taxonomy              | 0            | SQL  |
| wp_term_taxonomy | description           | 0            | SQL  |
| wp_termmeta      | meta_key              | 0            | SQL  |
| wp_termmeta      | meta_value            | 0            | SQL  |
| wp_terms         | name                  | 0            | SQL  |
| wp_terms         | slug                  | 0            | SQL  |
| wp_usermeta      | meta_key              | 0            | SQL  |
| wp_usermeta      | meta_value            | 0            | PHP  |
| wp_users         | user_login            | 0            | SQL  |
| wp_users         | user_nicename         | 0            | SQL  |
| wp_users         | user_email            | 0            | SQL  |
| wp_users         | user_url              | 0            | SQL  |
| wp_users         | user_activation_key   | 0            | SQL  |
| wp_users         | display_name          | 0            | SQL  |
+------------------+-----------------------+--------------+------+
Success: Made 3992 replacements.

That’s it. After running the command, the blog is completely on https and the security gods are happy :). Now I need to update all the URL’s on the main site to reference https instead of http and that is going to be painful. It will require a whole lot of script-fu to do it automatically as it will have to be a regex/awk or something similar. Maybe someone already did the work and posted the solution online. Alas that was not the case. I ended up manually updating the files since there were only about 20-25 of them. Opened all of them in the editor one-shot and then did a search & replace. Now both sites are coming up properly in https.

– Suramya

August 17, 2020

Issue with Site Posts

Filed under: Website Updates — Suramya @ 2:50 PM

Update 8/17/2020: Issue resolved. The problem was caused because I had a missing single quote in the previous post. Once I added the quote to the post things went back to normal.

There seems to be an issue with WordPress where some of my posts have gone MIA on the main page even though the direct links work. Also some of the posts are being merged together for some reason.
I am looking into it, so please be patient.

– Suramya

October 2, 2014

Celebrating 10 years of Blogging

Filed under: My Thoughts,Website Updates — Suramya @ 1:51 AM

As of 1st Oct 2014, Suramya’s Blog has been online for exactly 10 years and I have spent a lot of time posting random thoughts, tutorials, event analysis etc on the Blog. In my first post I said “I don’t know how often I will be updating this but I will definitely try to update this a little more often than my website.”, if nothing else I know for sure that I did manage to update the blog more often than the main site (which is something I do plan to change BTW by updating the site more often). There were periods where I didn’t post much and the blog just languished and periods where I posted tons of posts.

Here are some stats as of 2nd Oct 2014:

Total published posts : 876
Total Published Comments [1] : 560
Spam Comments Blocked : 438,580
Maximum posts in a Month (Made in Jan 2010) : 81
Media Uploaded : 26MB

I wish I had visitor stats to share but I don’t because the plugin I was using earlier maxed out my DB size allocation and I deleted the data to bring the site back online. I just enabled a new plugin today that is highly recommended and doesn’t use that much space (as per the reviews). Let’s see how that works out.

It is interesting to note that most of the folks who had active blogs when I started no longer blog actively, for some post once every few months others haven’t posted in years. Some of you may wonder why that is the case. Well the answer is that I don’t know. Some folks got busy, some ran out of things to say or just lost interest. I blog because I like to have a way to talk about stuff I have been thinking about, stuff I find interesting or just random things I find online. I think as long as I keep finding cool things I will keep posting about it (Provided I get the time to write posts that don’t sound like they were written by a 5 year old.) Here’s to another 10 years of ‘successful’ blogging.

Well this is all for now, will post more later.

– Suramya

[1] A lot of the comments were lost when I moved from my old blogging software to WordPress. I had intended to spend time writing a parser to import them to WP but never got around to doing it.

March 31, 2014

Blog/site is having issues

Filed under: Website Updates — Suramya @ 12:24 AM

The entire suramya.com domain is having issues, but the blog is the most hit. Spoke to 1and1 (my hosting provider) and as per them there is a issue ongoing that could be impacting my sites as well. They expect it to be resolved in the next day or so… As currently the blog admin pages are pretty much unusable so I don’t think I will be posting anything till it is resolved.

Update (2nd April 2014): The site is now back to normal, but still no answer on what was causing it to become so slow. Ah well… Atleast now I can get to the admin page now and all I need is some time to create posts.

– Suramya

July 18, 2013

Did some maintainence on the site. More to come

Filed under: Website Updates — Suramya @ 10:08 PM

After a long time of trying to ignore the issues on the site, I finally spent some time last night doing some maintanence on it. Upgraded the version of WordPress that I am using to the latest version, also fixed the DB issue that caused the Photogallery to go down. No, I haven’t uploaded any new content or photos to the site yet. Will do that sometime this year. 🙂

I also need to move the site to a new hosting service but need time to do all the nitty-gritty backend work to get the site to work on the new servers so that is on hold till I know I have a weekend to spend on it. Dusted off some old articles that I was in process of writing till I got distracted so might finish some of them this weekend, but lets see.

Well this is all for now. Will post more later.

– Suramya

Older Posts »

Powered by WordPress