Skip to content

Instantly share code, notes, and snippets.

View schadokar's full-sized avatar
😵

Shubham Chadokar schadokar

😵
View GitHub Profile
@schadokar
schadokar / main.go
Created November 27, 2022 07:23
gochatapp-v001
package main
import (
"fmt"
"log"
"net/http"
"strings"
"time"
"github.com/gorilla/websocket"
@schadokar
schadokar / rediscommand.csv
Last active November 7, 2022 06:20
gochatapp glossary list
Data Type Command
Strings SET GET
SET SADD SCARD SISMEMBER
SORTEDSET ZADD ZRANGE
RedisJSON JSON.SET JSON.GET
Redisearch FT.CREATE FT.SEARCH FT._LIST
Hashes (Hashmap) HSET HGET
LIST LPUSH LPOP RPUSH RPOP
Streams XADD XRANGE
Geospatial GEOADD GEOSEARCH
@schadokar
schadokar / main.go
Created November 6, 2022 16:52
gochatapp main.go
package main
import (
"flag"
"fmt"
"log"
"gochatapp/pkg/httpserver"
"gochatapp/pkg/ws"
@schadokar
schadokar / websocket.go
Created October 31, 2022 06:13
gochatapp websocket.go
package ws
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
"gochatapp/model"
@schadokar
schadokar / chathandler.go
Created October 20, 2022 05:42
gochatapp httpserver
package httpserver
import (
"encoding/json"
"fmt"
"log"
"net/http"
"gochatapp/pkg/redisrepo"
)
@schadokar
schadokar / client.go
Last active October 5, 2022 15:10
redisrepo
package redisrepo
import (
"context"
"log"
"os"
"github.com/go-redis/redis/v8"
)
@schadokar
schadokar / spiral-matrix.js
Created November 13, 2020 12:16
Create a spiral matrix
// --- Directions
// Write a function that accepts an integer N
// and returns a NxN spiral matrix.
// --- Examples
// matrix(2)
// [[1, 2],
// [4, 3]]
// matrix(3)
// [[1, 2, 3],
// [8, 9, 4],
#!/usr/bin/env bash
#
# Run a minimal Solana cluster. Ctrl-C to exit.
#
# Before running this script ensure standard Solana programs are available
# in the PATH, or that `cargo build` ran successfully
#
set -e
# Prefer possible `cargo build` binaries over PATH binaries
@schadokar
schadokar / node-mail.js
Last active July 19, 2020 15:02
Basic send mail using nodejs
"use strict";
const nodemailer = require("nodemailer");
/**
* sendEmail
* @param {Object} mailObj - Email meta data and body
* @param {String} from - Email address of the sender
* @param {Array} recipients - Array of recipients email address
* @param {String} subject - Subject of the email
* @param {String} message - message
@schadokar
schadokar / 0-self-publishing.md
Created May 2, 2020 17:33 — forked from caseywatts/0-self-publishing.md
Self-Publishing via Markdown

short url: caseywatts.com/selfpublish


Markdown --> PDF (as a booklet!)

Markdown --> EPUB and MOBI

I'm working on a book, "Debugging Your Brain" which I plan to self-publish. I'm writing the chapters in Markdown, and I want to have it both printed on paperback and available as an eBook on Kindle etc. Here are the tools I used to get my markdown files (from my Jekyll based blog) into the PDF, EPUB, and MOBI formats.