Skip to content

Instantly share code, notes, and snippets.

@ankitrgadiya
ankitrgadiya / lsp-transcript.txt
Created August 25, 2025 18:01
Eglot occur-mode
[jsonrpc] D[23:14:54.887] Running language server: gopls
[jsonrpc] e[23:14:54.888] --> initialize[1] {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":479135,"clientInfo":{"name":"Eglot","version":"1.18"},"rootPath":"/home/ankit/Downloads/","rootUri":"file:///home/ankit/Downloads","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":false,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":fa
@ankitrgadiya
ankitrgadiya / steps.sh
Last active August 19, 2025 09:57
Compile Emacs
# Savannah Hosts are slower sometimes. Using Github Mirror.
git clone https://github.com/emacs-mirror/emacs
cd emacs
# Checkout Emacs 29 Branch
git checkout emacs-29 origin/emacs-29
# Ensure that Emacs Dependencies are pre-installed.
# This can be done by installing System's Emacs package or Manually
# installing dependencies.
@ankitrgadiya
ankitrgadiya / docker-compose.yaml
Created December 4, 2022 15:59
SilverBullet Docker Compose
services:
silverbullet:
user: "1001"
image: denoland/deno:alpine
init: true
environment:
TINI_SUBREAPER: 1
volumes:
- ../../data/silverbullet/notes:/notes
- ../../data/silverbullet/deno:/deno-dir
@ankitrgadiya
ankitrgadiya / init.sh
Last active September 27, 2022 10:50
Mullvad + Tailscale
#!/bin/bash
sudo nft -f mullvad-tailscale.rules
@ankitrgadiya
ankitrgadiya / config.rb
Created March 12, 2022 23:50
Gollum Configuration
require 'commonmarker'
module Gollum
class Markup
mmd = proc { |content|
MultiMarkdown.new(content).to_html
}
GitHub::Markup::Markdown::MARKDOWN_GEMS['commonmarker'] = proc { |content, options: {}|
commonmarker_opts = [:GITHUB_PRE_LANG].concat(options.fetch(:commonmarker_opts, []))
commonmarker_exts = options.fetch(:commonmarker_exts, [:tagfilter, :autolink, :table, :strikethrough, :tasklist])
diff '--color=auto' --unified --recursive --text bond_core/smclib/package.xml bond_core.new/smclib/package.xml
--- bond_core/smclib/package.xml 2022-01-10 02:21:04.187157016 +0530
+++ bond_core.new/smclib/package.xml 2022-01-10 02:16:40.986046532 +0530
@@ -5,14 +5,7 @@
<package format="3">
<name>smclib</name>
<version>1.8.6</version>
- <description>
- The State Machine Compiler (SMC) from http://smc.sourceforge.net/
- converts a language-independent description of a state machine
@ankitrgadiya
ankitrgadiya / run.sh
Last active September 23, 2021 18:33
Getting Started with Rio CLI
#!/bin/bash
echo "Installing the CLI..."
pip3 install -i https://test.pypi.org/simple/ --extra-index-url=https://pypi.org/simple rapyuta-io-cli
echo "Ensure docker is running..."
sudo systemctl start docker
echo "Run a virtual robot inside docker..."
docker run \
@ankitrgadiya
ankitrgadiya / patch.diff
Created November 21, 2020 20:32
Libxml Patch
diff --git a/PKGBUILD b/PKGBUILD
index 02e0d54..9656423 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ url="http://xmlsoft.org/"
license=('GPL')
depends=('zlib')
options=('!libtool')
-source=("ftp://xmlsoft.org/libxml2/old/${pkgname}-${pkgver}.tar.gz")
+source=("http://xmlsoft.org/sources/old/${pkgname}-${pkgver}.tar.gz")
@ankitrgadiya
ankitrgadiya / mysql.diff
Created August 25, 2019 08:09
MySQL Operator Diff
diff --git a/vendor/github.com/presslabs/mysql-operator/pkg/apis/mysql/v1alpha1/mysqlbackup_types.go b/vendor/github.com/presslabs/mysql-operator/pkg/apis/mysql/v1alpha1/mysqlbackup_types.go
index 47a69a2a..fcded4aa 100644
--- a/vendor/github.com/presslabs/mysql-operator/pkg/apis/mysql/v1alpha1/mysqlbackup_types.go
+++ b/vendor/github.com/presslabs/mysql-operator/pkg/apis/mysql/v1alpha1/mysqlbackup_types.go
@@ -85,7 +85,8 @@ const (
// MysqlBackupStatus defines the observed state of MysqlBackup
type MysqlBackupStatus struct {
- // Complete marks the backup in final state
+ // Completed indicates whether the backup is in a final state,
@ankitrgadiya
ankitrgadiya / op.sh
Created April 18, 2019 09:24
Operator SDK restart
#! /usr/bin/env bash
# set -x
if [ ! -f "./Gopkg.toml" ] && [ ! -d "./.git" ]
then
echo "Directory is not correct"
exit 1
fi