Skip to content

Instantly share code, notes, and snippets.

View Ravilochan's full-sized avatar
🏠
Working from home

rxvio Ravilochan

🏠
Working from home
View GitHub Profile
@t3dotgg
t3dotgg / model-prices.csv
Last active April 16, 2025 12:43
Rough list of popular AI models and the cost to use them (cost is per 1m tokens)
Name Input Output
Gemini 2.0 Flash-Lite $0.075 $0.30
Mistral 3.1 Small $0.10 $0.30
Gemini 2.0 Flash $0.10 $0.40
ChatGPT 4.1-nano $0.10 $0.40
DeepSeek v3 (old) $0.14 $0.28
ChatGPT 4o-mini $0.15 $0.60
DeepSeek v3 $0.27 $1.10
Grok 3-mini $0.30 $0.50
ChatGPT 4.1-mini $0.40 $1.60
worker_processes 1;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name localhost;
@AlexandraKapp
AlexandraKapp / osrm_docker_windows.md
Last active January 26, 2025 11:58
How to set up your own OSRM backend with Docker on Windows

How to set up your own OSRM backend with Docker on Windows

The OSRM docker quick start provides a great explanation on how to set up the container: https://hub.docker.com/r/osrm/osrm-backend/

Yet - for Docker on Windows minor changes were necessary for me (otherwise I'd get "File not found" or "Permission" errors).

This is how it worked for me:

1. Pull the image

@robmarshall
robmarshall / useEffect-async-loader.js
Created September 29, 2019 15:55
Component using useEffect and Axios to get async data
import React, { useState, useEffect } from "react";
import axios from "axios";
const fetchDataCall = async ({ api }) => {
let apiReturn = await axios
.get(api)
.then(async function(response) {
return response;
})
.catch(function(error) {
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active April 16, 2025 07:02
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active March 19, 2025 14:37
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@bmaupin
bmaupin / free-database-hosting.md
Last active April 15, 2025 03:44
Free database hosting
@ulyssesr
ulyssesr / nginx.conf
Last active March 18, 2025 17:57
Nginx RTMP Setup
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;