Skip to content

Instantly share code, notes, and snippets.

View agnivade's full-sized avatar

Agniva De Sarker agnivade

View GitHub Profile
@agnivade
agnivade / docs.md
Created January 3, 2022 14:31
Invalid json

While trying to upgrade to an MM version >= 6.0.x, you might encounter an error of the form:

Failed to alter column type. It is likely you have invalid JSON values in the column. Please fix the values manually and run the migration again.

This means the particular column has some invalid JSON values which need to be fixed manually. A common fix that has known to work is to wipe out all \u0000 characters.

Follow these steps:

@agnivade
agnivade / commit_msg.go
Last active July 9, 2021 06:58
Add release notes to commit message
package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"regexp"
)
{
"clients":
{
"gopls":
{
"command": ["/home/agniva/go/bin/gopls",
"-v",
"-rpc.trace",
"-logfile=/home/agniva/gopls.log"],
"enabled": true,
@agnivade
agnivade / commit-msg
Last active October 19, 2021 08:33
Bash file to check commit message structure
#!/bin/bash
#http://chris.beams.io/posts/git-commit/#seven-rules
cnt=0
while IFS='' read -r line || [[ -n "$line" ]]; do
cnt=$((cnt+1))
length=${#line}
if [ $cnt -eq 1 ]; then
# Checking if subject exceeds 50 characters
if [ $length -gt 50 ]; then
echo "Your subject line exceeds 50 characters."
@agnivade
agnivade / vimrc
Last active August 29, 2015 14:07
my vimrc file
set number
set tabstop=2
set expandtab
set smartindent
set autoindent
set smarttab
set shiftwidth=2
set ignorecase
set incsearch
set hls