Skip to content

Instantly share code, notes, and snippets.

View shreyas44's full-sized avatar

Shreyas Sreenivas shreyas44

View GitHub Profile
[package]
name = "rust-chat"
version = "0.1.0"
edition = "2024"
[dependencies]
chrono = "0.4.42"
clap = {version = "4.5.50", features = ["derive"]}
colored = "3.0.0"
crossterm = "0.29.0"
@shreyas44
shreyas44 / create_user_session.js
Last active February 12, 2021 11:57
session authentication tutorial embeds
// create-session/index.js
const { DynamoDB } = require("@aws-sdk/client-dynamodb")
const { marshall } = require("@aws-sdk/util-dynamodb")
const { SHA256 } = require("crypto-js")
// Use region specified in environment or default to ap-south-1
const REGION = process.env.AWS_REGION || "ap-south-1"
const TABLE_NAME = "UserSessions"
const axios = require("axios")
const sendWhatsappMessage = async (number, message) => {
await axios.post(
"https://messages-sandbox.nexmo.com/v0.1/messages",
{
from: {
type: "whatsapp",
number: process.env.VONAGE_NUMBER,
},
to: {
@shreyas44
shreyas44 / .gvimrc
Last active December 29, 2024 09:24
Vim Setup
set linespace=1
"moving lines with command key
map <D-j> :m .+1<CR>==
map <D-k> :m .-2<CR>==
"imap <D-/> <Esc>:<Leader>c<space><CR>i
"Font for powerline
set guifont=Meslo\ LG\ S\ DZ\ for\ Powerline:h12