Blog

Bash scripting to compare the Ossasepia logs

The task is to devise a bash script to compare the logs of ossasepia on different servers (here in particular logs.nosuchlabs.com and logs.ossasepia.com). This is the first time I’ve written a bash script going beyond a handful of simple commands. I’m happy to hear feedback on how the approach / code can be improved. TL;DR…

*What* do I need first before “TMSR is all I wanna do”

Updates: [2019-09-13 Fri]: Added rough estimate for cost of living @ Canada. Distilled (4.0). This will be subsequently expanded to consider altogether other locations. [2019-09-14 Sat] Added Path forward section and also some references to chan discussions. Log Reference to the question Fodder These are general rough points from which some inference is extracted into…

Some notes on research-compendium

These are my notes while studying the research-compendium concept, which is essentially a bunch of guidelines to produce research that is ‘easily’ reproducible. I’m sure I will have better methods in hand when I comprehend v.py and make progress in my tasks. The notes are mostly based on https://peerj.com/preprints/3192/, which is recommended as a canonical…

Brief notes on security and removing HTTPS from my website

I was under the false impression (based on superficial ‘knowledge’) that enabling HTTPS for my website is a fundamental method of securing the communication and connection with my website. My mentors at TMSR were kind to open my eyes and get me started in the right direction. Besides hosting my website – the plan was…

Canada Open Data : Exploration of Wages

Plan [ ] Decide on which data set is to be analysed [ ] Ensure a method to access the same version of the data to enable reproducing the analysis. [ ] Visual exploration to understand the features available. [ ] Formulate questions for Exploratory Data Analysis (EDA) [ ] Evaluate the possible directions in terms of applying ML [ ]…

Google Groups

“I have come to believe that large print, thick and heavy paper, and wide margins and oversize leading is indicative of the expected intelligence of the reader. If the reader is expected to be unable to concentrate or experiences mental fatigue just by looking at a page of text without oceans of whitespace, the material…

Land of Lisp (O’Reilly | Safari)

Where Does Lisp Get Its Power? I’ve said that Lisp is a particularly powerful language. So what were the key insights that John McCarthy (and the other, later innovators … – Selection from Land of Lisp [Book]

"The second trait that gives a language power is letting you muck around inside it as deeply as possible to make it do your bidding. That way, even if the designers of the language never conceived of what you’re trying to do, you can make your own changes to the language until it does exactly…

How to Actually learn programming [0/2]

The goal is to complete the tasks outline in a CH article. This post will contain the plan, as well as the notes on each task. A few of the exercises are already completed. Plan and Task overview Reading [ ] Learning Lisp: I started going through Land of Lisp (Conrad Barski), since it was available…

A deeper evaluation of indiewebifying my website

This post is in response to Diana’s comment on an earlier post, whose excerpts are quoted and answered. Additional notes on the ‘experiment’ are added and will serve as useful reminders about what was done. Started at zero knowledge of implementation : okay, not really. >> Specifically, since you didn’t know what the things was,…

Conforming to a blog layout and component guideline

This is an evaluation spurred by a lively discussion, as always, and the result is in front of you. Well I took a breath and stopped and took in feedback, and I feel good about the results.. mostly. Reflections Analysing how things have gone has revealed the following: It starts with a desire some little…

Temporary fix for fatwigoo issue with indieweb-publisher theme

Excerpt from IRC convo [su_note]<+GWG> https://github.com/dshanske/indieweb-publisher/blob/96514b9866bc146ab5d4579ad659e1e9dcf58088/inc/template-functions.php#L63 +GWG> Comment out this line for now. <+GWG> It should be an easy fix once I get to it[/su_note] the line to be commented out is : [su_note] return Kind_Taxonomy::get_icon( $term->slug); [/su_note]

@kaushalmodi: how do you enable the select text + link to selection on your posts? Would you also happen to know of any approach / solution for #wordpress ?

Summary : Your feelings are Out to Get You

As planned, this is a summary of the article, Your feelings are Out to Get You. ‘thinking’ and ‘feeling’ are two entirely different things and it is important to take ‘extra effort’ to recognise the distinction, because the signs are not lucid to behold. If left unchecked and worse, unrecognised – feelings can grow in…

Python notes and snippets

The following resources were utilised to develop the snippets and notes below. Other links are also available inline with the text. The Mouse v/s The Python – Mike Driscoll’s website Real Python email newsletters, books, courses. Howard Abram’s video on literate dev-ops using Emacs, as well as his blog posts in general Python cookbook :…

R notes and snippets

Installing R on debian [sourcecode language="shell" title=""] cat >> /etc/apt/sources.list << EOF deb http://cran.rstudio.com/bin/linux/debian stretch-cran34/ EOF [/sourcecode] Install dirmngr [sourcecode language="shell" title=""] sudo apt install dirmngr [/sourcecode] Receive debian key [sourcecode language="shell" title=""] sudo apt-key adv –keyserver keys.gnupg.net –recv-key ‘E19F5F87128899B192B1A2C2AD5F960A256A04AF’ [/sourcecode] Update the repo and then install R [sourcecode language="shell" title=""] sudo apt update sudo…

Using ESS for Data Science

RStudio is a formidable IDE to work with and offers an environment to seamlessly work with multiple languages beyond R. It is especially convenient for tasks involving frequent visualisation of data frames and plots, and for use with Shiny app development. However, the text (i.e code) editing capabalities are still significantly lacking compared to the…

Notes on Docker

Docker is a fascinating concept that could be potentially useful in many ways, especially in Data science, and making reproducible workflows / environments. There are several articles which have great introductions and examples of using docker in data science This is an evolving summary of my exploration with Docker. It should prove to be a…

Use template parts to match your theme’s styling by Bill Erickson

Display Posts lets you easily display posts based on any criteria you choose without any coding.
It can be difficult to match your theme’s design for post summaries using just the shortcode and CSS. That’s where template parts come in. Styling belongs in a theme
Your theme already contains the …

I’m planning to use this to create some custom pages to enable quickly viewing specific views of all the content. #wordpress #php

Linux notes

Copy SSH id [sourcecode language="shell" title="" ] ssh-copy-id -i ~/.ssh/id_rsa shrysr@s.ragavan.co:~/.ssh/ [/sourcecode] Installing node js and npm on debian [sourcecode language="shell" title="" ] curl -sL https://deb.nodesource.com/setup_12.x | bash – apt-get install -y nodejs [/sourcecode] Installing Go on debian Instructions followed of Linode worked well. The latest version has to be noted and replaced below from…

Updates Note taken on [2019-08-25 Sun 21:36] Started exploring the SHA-512 cipher and recording notes. Switched to reading the Serious Cryptography book and digging into the fundamentals of encryption. This has made a large difference even though I’ve barely covered the first chapter. Added a section for notes. Note taken on [2019-08-22 Thu] Specified python…

Tips for building a dev-env with docker (Muffin Research Labs)

There’s a few gotchas when using docker to run your development environment. This post provides tips on overcoming the biggest hurdles you might face.

"Having used docker-compose (née fig) on the marketplace development environment. We learnt a lot about what did and didn’t work. Two of the biggest issues we hit were: Dependencies and dep updates Front-end tools the best way to avoid deps becoming a problem, is to use the hub to build your docker images from a…

Including parts of README.rst in your sphinx docs (Muffin Research Labs)

This will probably be of use to about 3 people, and I’m one of them. If you feel your eyes glazing over, don’t fret and look at this kitten picture instead: The problem I wanted to add some content to both our docs (built via sphinx docs and written in

"ReStructured text has a handy include directive which allows you to include content files by path references. I tried using that in the README.rst and our docs. Unfortunately on github this fails for the README because github don’t allow the include directive for security reasons. There’s a neat facility in RST that allows you to…

"If you look over all these Makefiles you’ll see that there are probably only five or six elements which are repeated over and over. It doesn’t take many lines in a Makefile to get powerful results, yet I run the command make literally dozens of times per day in widely varying projects. GNU Make is…

jswidler/lockgit (GitHub)

A CLI tool for storing encrypted secrets in a git repo – jswidler/lockgit

This could be a convenient alternative to store secrets in a public repo. As of now, I’m just using GPG files, but these are typically stored in a private repo. I’m not really sure if this is a secure approach.

2.0.0 (Homebrew)

Today I’d like to announce Homebrew 2.0.0. The most significant changes since 1.9.0 are official support for Linux and Windows 10 (with Windows Subsystem for Linux), brew cleanup running automatically, no more options in Homebrew/homebrew-core, and removal of support for OS X Mountain Lion (10.8) and older.

Homebrew can now be used on #Linux as well as #Windows (WSL) ! This is cool.

Overall – these appear sensible guidelines to follow, though they do not dig deeper into production related tips. Also discovered the nbdime (https://github.com/jupyter/nbdime) through this article. https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1007007

a post by Kaushal Modi :emacs:Kaushal Modi :emacs:

@s.ragavan.co
See if https://github.com/cweiske/stapibas helps. I do not have a server to host an instance of it. But the author of that project was kind enough to let me send #webmentions through his instance.
The benefit of stapibas is that it does the database management of which wm’s have alread…

Thanks! I will keep this in mind for the next round and check it out. Ha, its a tiny ‘nanode’ server on Linode 🙂 Its surprising what can be done with 1GB of RAM and 1 CPU core. There are definitely several rough edges to look into in my setup 😀 Your 2nd reply shows…

a post by Kaushal Modi :emacs:Kaushal Modi :emacs:

@s.ragavan.co Thanks for that update.
You certainly have experience with server setup and dealing with #Wordpress installation. Honestly speaking, as there are many Wordpress users, its #webmentions plugin should be well maintained too.
This is great as you got the things set up as you wanted.
> Now…

‘Indiewebifying’ my website

TL;DR Started out with zero knowledge of indieweb and wanted to indiewebify my hugo website and use self-hosted services or apps. Discovered that a completely self-hosted indieweb workflow (on a static website) has several components to consider and setup (not to mention the things I don’t know that I don’t know). Finally, reverted to using…

a post by Kaushal Modi :emacs:Kaushal Modi :emacs:

@kaushalmodi: Though I made progress – there was too much to look into and I stopped at the point where I was trying to setup webmentions.io as a self-hosted service. So, to get moving – I went back to my WP setup and have finally ‘indiewebified’ my site.. Using WP for this was relatively straightforward…

The ‘Get Current URL’ Bookmarklet Pattern (arcadiamashups.blogspot.com)

In An Introduction to Bookmarklets , I introduced the idea of a bookmarklet , a browser based bookmark that lets you execute a small Javascr…

Created my first bookmarklet thanks to the information and tool at this link. The bookmarklet essentially captures the current webpage URL and opens the reply tab of Quill (a micropub editor) with the URL and title ready. For reference, the reply bookmarklet is javascript:(function(){window.location=’https://quill.p3k.io/new?reply=’+encodeURIComponent(window.location.href);})()

MathJax basic tutorial and quick reference (Mathematics Meta Stack Exchange)

(Deutsch: MathJax: LaTeX Basic Tutorial und Referenz)
To see how any formula was written in any question or answer, including this one, right-click on the expression it and choose “Show Math As > …

This is an excellent quick reference for MathJax and Latex. It is easy to look up and the subsequent posts also contain useful references.

Table of Contents Problem Solution Problem Org mode when exporting to html auto generates internal links by the sequence number, e.g. # orgheadline23. It causes a few problems: If multiple blog post… Source: Globally unique internal links exported by org mode – Robert Kozikowski’s blog

As per indieweb ‘conventions’: Article: traditional long form content: a post with an explicit title and body Note: short content: a post or status update with just plain content and typically without a title I started with defining the majority of posts as notes. My updated strategy will be to use the article form by…

Berlin by an author from https://open.spotify.com/album/2eXqyX1tSiZceK65yujoCt

Berlin, a song by Cook & Stans on Spotify

Liked: https://open.spotify.com/track/0CVQk30boC9u7BVJoRO4db?si=_2Q-UaFTRamT-SjJksIgIQ

Easy to resize the swap partition in Linode

In the ‘new’ interface for Linode manager – the advanced tab contains the list of disks. When the Linode is fully powered down, it is possible to resize the partitions as desired. My earlier notes indicate that atleats 2.5GB of swap space was required to install Rstudio (without docker) in the past, on a machine…

Installing UMAP took up nearly 1-1.5 GB of swap

Atleast ~500MB of RAM and around 1-1.5GB of swap was used while installing the UMAP package into rocker/tidyverse. It also took ~10 minutes atleast, and started with installing the reticulate, Rspectra and Rcppeigen (?) packages first, after which UMAP was installed. It would certainly save time and head-banging to have umap already installed into a…

Nick Janetakis’s course has been a significant boost in mastering the most commonly used commands in Docker. While there is much to cover in terms of serving web applications – I am now able to ‘fluently’ move around in Docker. The notes have come along well in general and should become a worthy reference. Considering…

Thoughts on: Causes and purposes

Article reference I do believe (and have experienced) that following a doctrine aligned absolutely to a cause provides advantages. However, this also introduces its own brand of complications. For eg, ‘Under no circumstance will I speak ill of somebody behind their back’ – this may be a work ethic based on a ‘commendable’ cause, but…

mosh – for better access to my VPS

Mosh is short for mobile shell, and is useful as an alternative to SSH, especially for poor network conditions, and where one has to frequently switch networks. It works via the UDP port, which has to be specifically enabled. I learnt of mosh through the guys in the #emacs. I’ve faced frequent trouble due to…

The WoT – revisited

My previous post on the WoT did not provide a clear indication of my understanding, and also had some erroneous statements. This is an improved summary of what I know about WoT. There are 2 ‘processes’ to note regarding the concept of the WoT: Assigning a rating to a person you know, who will become…

Failed to implement the line selection to URL hack

It would terribly convenient to be able to highlight a bunch of lines in a blog post and link to that selection in a discussion! Reference message from Diana Coman: shrysr: note that there is some trouble in that the original thing (which is working on younghands.club too) relies on the structure that apparently is…

ggplot2 –> plotly, transferring subtitles and captions

Lets presume that a ggplot object(g) is available, and the idea is to convert this into a plotly object (p), which offers enhanced interactivity of plots. However, the subtitle and captions defined in the said ggplot object do not get translated into plotly. This is a feature enhancement that has been raised in November 2016…

Removing cloudflare from the VPS

diana_coman’s comment about removing cloudflare’s service from my VPS made me realise: I went ahead (on autopilot??) in setting up Cloudflare for my VPS considering no logical basis. As mentioned in this blog article, cloudflare.com acts as a ‘reverse proxy server’ for websites. Using cloudflare is by no means compulsory or critical for general purpose…

Archaic text based email clients rock!

Table of Contents TLDR – for the busy folks Goals: Summary: Multiple email accounts. Lack of a unified interface. Creating sync channels via mbsync Text based email client! Speed + simplicity Why mu4e rocks [for me] – the perks Quirks Multiple levels of filters are still necessary. Takeaways Links and References This dev.to blog post…

Iosevka – an awesome font for Emacs

Before my foray into Emacs, I purchased applications like IAWriter (classic)1, Marked2, Texts (cross platform Mac/Windows), and have also tried almost all the recommended apps for longer form writing. I am a fan of zen writing apps. In particular the font and environment provided by IAWriter are conducive to focused writing. There also exist apps…

Rapidly accessing cheatsheets to learn data science with Emacs

Matt Dancho’s course DSB-101-R is an awesome course to step into ROI driven business analytics fueled by Data Science. In this course, among many other things – he teaches methods to understand and use cheatsheets to gain rapid level-ups, especially to find information connecting various packages and functions and workflows. I have been hooked to…

Juggling multiple projects and leveraging org-projectile

Scimax has a convenient feature of immediately creating projects (M-x nb-new). The location of the project directory is defined by the setting (setq nb-notebook-directory “~/my_projects/”), which has to be set in your Emacs config. Once the name of the project is chosen, a Readme.org buffer is immediately opened and one can start right away. It…

Jupyter notebooks to Org source + Tower of Babel

This post provides a simple example demonstrating how a shell script can be called with appropriate variables from any Org file in Emacs. The script essentially converts a Jupyter notebook to Org source, and Babel is leveraged to call the script with appropriate variables from any Org file. This reddit thread and blog post elucidate…