Skip to content

Instantly share code, notes, and snippets.

View rcanand's full-sized avatar

Anand C Ramanathan rcanand

  • MLAI LLC
  • Bellevue, WA, USA
View GitHub Profile
/* A Dark Mode Markdown Preview stylesheet for vscode markdown previews
Created via Claude chat
- Download and add this file in each vscode workspace root that you want to use it.
- In your workspace settings, ./.vscode/settings.json, add a reference to this.
{
"markdown.styles": [
"md_preview_dark_theme.css"
]
}
- Now, whenever you open a markdown file as a preview (Markdown: Open Preview to the side), you will get colors for all the markup - headings,
@rcanand
rcanand / about.md
Last active January 6, 2026 03:08
Asta report viewer

The html file is used as a standalone html viewer to locally view research reports generated by Allen AI's asta (https:// asta.allen.ai) by clicking on "Generate report". You can then download the report as json by clicking on "Download Report" when the report is complete.

Download the html file above, and open it in your browser. Drag one of the reports you downloaded from asta into the box on the html page. You will see it rendered nicely and locally.

Disclaimer: I am not affiliated with Allen AI or their asta product in any way - just a big fan and use this feature (their deep research) a lot.

@rcanand
rcanand / json_viewer.html
Created September 3, 2025 18:32
Json Viewer - view, navigate (with breadcrumbs), search any json file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JSON Viewer</title>
<style>
* {
margin: 0;
padding: 0;
@rcanand
rcanand / csv_viewer.html
Created February 22, 2025 06:29
Standalone html file to view local csvs in a table, sort and filter columns.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSV Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.4.1/papaparse.min.js"></script>
<style>
:root {
--bg-primary: #1a1a1a;
@rcanand
rcanand / cursor_clear_terminal_keyboard.md
Last active February 11, 2025 17:13
Cursor clear terminal with keyboard shortcut

Cursor clear terminal with keyboard shortcut

Problem

Cursor hijacks Cmd-K, Cmd-Shift-K, Cmd-L for launching AI. Some of these are used to clear the terminal. You can type clear in the terminal, but that does not work if you have already typed in a command, and want to clear before it is run.

Workaround

This is a workaround with a custom keyboard shortcut (I use Cmd-Alt-K, on mac, you can change to anything you want that doesn't conflict with your existing workflows).

from sympy import sieve
def goldbach():
'''
For each even number > 2,
it finds a pair of two primes that add up to the number
'''
even = 4
@rcanand
rcanand / gist:ac898e53068979b09231
Created August 25, 2015 03:18
bundle list for fontawesome issue
Gems included by the bundle:
* actionmailer (4.2.3)
* actionpack (4.2.3)
* actionview (4.2.3)
* activejob (4.2.3)
* activemodel (4.2.3)
* activerecord (4.2.3)
* activesupport (4.2.3)
* acts-as-taggable-on (3.5.0)
* acts_as_commentable (4.0.2)
GIT
remote: git://github.com/ifad/data-confirm-modal.git
revision: 931cab3b269c6dab301245be2b2d738b243ba169
specs:
data-confirm-modal (1.0.2)
railties (>= 3.0)
GEM
remote: https://rubygems.org/
specs:
@rcanand
rcanand / links_gmail_and_safari.rb
Created February 14, 2011 22:07
Extracts and shows links from gmail and safari bookmarks
## /config/initializers/dynamic_job.rb
require 'heroku'
# base class for all jobs that you wish to automatically scale and go down in Heroku
class DynamicJob
#set a cap on maximum number of users ever - just in case.
MAX_CONCURRENT_WORKERS = 100
def initialize