Skip to content

Instantly share code, notes, and snippets.

View codebanesr's full-sized avatar
🌿
Make a small contribution to the world

shanurrahman codebanesr

🌿
Make a small contribution to the world
View GitHub Profile
@codebanesr
codebanesr / docker-compose.yml
Created October 19, 2020 08:46
Grafana-influx-db
version: '2'
services:
influxdb:
container_name: influxdb
image: docker.io/bitnami/influxdb:1-debian-10
environment:
- 'INFLUXDB_ADMIN_USER_PASSWORD=influxdb'
- 'K6_INFLUXDB_USERNAME=admin'
ports:
@codebanesr
codebanesr / patients.js
Last active July 8, 2021 03:07
Codementor session
const document_create = async (req, res, next) => {
try {
console.log("routeLog", "document_create");
console.log(req.body, "body")
const CPMRN = req.params.CPMRN;
const encounters = req.params.encounters;
const tags = req.body.props.tags;
const attributes = req.body.props.attributes;
@codebanesr
codebanesr / gist:495b431cc9ff74fb79c958d4de68e564
Last active August 11, 2021 21:30
Output for a single movie
{
"_id" : "HO00001421",
"theatres" : [
{
"_id" : ObjectId("61143e628284301a1db96afd"),
"title" : {
"text" : "Paw Patrol: The Movie",
"translations" : []
},
"genreIds" : [
@codebanesr
codebanesr / default.conf
Last active May 22, 2022 19:49
Nginx test configuration
gzip on;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
# Browser preferred language detection (does NOT require AcceptLanguageModule)
map $http_accept_language $accept_language {
default en;
~*^en en;
~*^ar ar;
}
@codebanesr
codebanesr / ai.md
Last active December 18, 2024 17:17
Ai service to extract information from a resume
import axios from 'axios'
import { ReadStream } from 'fs'
import OpenAI from 'openai'
import { ZodType } from 'zod'
import {
  OpenaiGenerateTextOptions,
  OpenaiProvider,
} from './providers/openai/openai.provider'
#!/bin/bash
set -euo pipefail
# -------------------------------
# 1. Verify Required Environment Variables
# -------------------------------
REQUIRED_VARS=("OPENAI_API_KEY" "ANTHROPIC_API_KEY")
for VAR in "${REQUIRED_VARS[@]}"; do
if [ -z "${!VAR:-}" ]; then
echo "Error: Required environment variable '$VAR' is not set."