All Projects → jackyzha0 → ctrl-v

jackyzha0 / ctrl-v

Licence: other
📋 a modern, open-source pastebin with latex and markdown rendering support

Programming Languages

javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ctrl-v

nextjs-github-pages
🚀 Deploy a Next.js app to Github Pages via Github Actions.
Stars: ✭ 89 (-4.3%)
Mutual labels:  vercel
Bear-Blog-Engine
Modern blog engine made with Go and the Next.js framework
Stars: ✭ 23 (-75.27%)
Mutual labels:  vercel
paperplanes.nvim
Neovim ✈️ Pastebins
Stars: ✭ 50 (-46.24%)
Mutual labels:  pastebin
fearless
A dashboard scaffolding based on Vue.js 3.x & TypeScript created by Vite.
Stars: ✭ 1,156 (+1143.01%)
Mutual labels:  vercel
website
Official dahliaOS website
Stars: ✭ 29 (-68.82%)
Mutual labels:  vercel
PastaBean
Python Script to Scrape Pastebin with Regex
Stars: ✭ 0 (-100%)
Mutual labels:  pastebin
pste
Just a simple file hosting application inspired by the likes of pomf.se and teknik.io.
Stars: ✭ 22 (-76.34%)
Mutual labels:  pastebin
BLUELAY
Searches online paste sites for certain search terms which can indicate a possible data breach.
Stars: ✭ 24 (-74.19%)
Mutual labels:  pastebin
personal-website
Personal website – made with Next.js, Preact, MDX, RMWC, & Vercel
Stars: ✭ 16 (-82.8%)
Mutual labels:  vercel
next-portfolio-dev
A portfolio for developers (Next js version)
Stars: ✭ 109 (+17.2%)
Mutual labels:  vercel
thvu-blog
My digital home on the internet.
Stars: ✭ 51 (-45.16%)
Mutual labels:  vercel
bradgarropy.com
🏠 my home on the web
Stars: ✭ 58 (-37.63%)
Mutual labels:  vercel
imperial
Official mono-repo for https://imperialb.in/
Stars: ✭ 35 (-62.37%)
Mutual labels:  pastebin
github-readme-twitter
Add Twitter to your github readme
Stars: ✭ 73 (-21.51%)
Mutual labels:  vercel
linear-discord-serverless
Get linear's events forwarded to Discord webhooks through Vercel serverless functions.
Stars: ✭ 47 (-49.46%)
Mutual labels:  vercel
json-resume-service
JSON resumes as a Service - generate Resumes from the resume.json schema
Stars: ✭ 41 (-55.91%)
Mutual labels:  vercel
Snippet-Share
This is a snippet sharing app that can be used to share snippets of code and more.
Stars: ✭ 41 (-55.91%)
Mutual labels:  pastebin
website
Personal website and blog built with Next.js, Preact, MDX, Tailwind CSS and hosted on Vercel.
Stars: ✭ 17 (-81.72%)
Mutual labels:  vercel
now-middleware
Chain Express middlewares with Vercel (ex-ZEIT) Now serverless functions.
Stars: ✭ 21 (-77.42%)
Mutual labels:  vercel
personal-website
My personal website, statically generated by Next.js
Stars: ✭ 16 (-82.8%)
Mutual labels:  vercel

ctrl-v

A modern, open-source pastebin with latex and markdown rendering support

Frontend is in React + Next.js and backend is in Go. Deployed via Vercel and Google Cloud Run.

Go Paste Example Markdown Rendering Showing off another theme! Latex Rendering

Public API

The ctrl-v API is provided for free for other developers to easily develop on top of it. It can be reached at https://api.ctrl-v.app/.

GET /health

# get the health of the API
curl https://api.ctrl-v.app/health

# 200 OK
# > "status ok"

POST /api

# create a new paste
curl -L -X POST 'https://api.ctrl-v.app/api' \
    -F 'expiry=2021-03-09T01:02:43.082Z' \
    -F 'content=print(\"test content\")' \
    -F 'title=test paste' \
    -F 'language=python'

# or with a password
curl -L -X POST 'https://api.ctrl-v.app/api' \
    -F 'expiry=2021-03-09T01:02:43.082Z' \
    -F 'content=print(\"test content\")' \
    -F 'title=test paste' \
    -F 'language=python' \
    -F 'password=hunter2'

# 200 OK
# > { "hash": "6Z7NVVv" }

# 400 BAD_REQUEST
# happens when title/body is too long, password couldnt
# be hashed, or expiry is not in RFC3339 format

GET /api/{hash}

# get unprotected hash
curl https://api.ctrl-v.app/api/1t9UybX

# 200 OK
# > {
# >   "content": "print(\"test content\")",
# >   "expiry": "2021-03-09T01:02:43.082Z",
# >   "language": "python",
# >   "timestamp": "2021-03-02T01:06:16.209501971Z",
# >   "title": "test paste"
# > }

# 401 BAD_REQUEST
# happens when paste is password protected. when this happens, try the authenticated alternative using POST
# 404 NOT_FOUND
# no paste with that ID found

POST /api/{hash}

# get unprotected hash
curl -L -X POST 'https://api.ctrl-v.app/api/1t9UybX' \
  -F 'password=hunter2'

# 200 OK
# > {
# >   "content": "print(\"test content\")",
# >   "expiry": "2021-03-09T01:02:43.082Z",
# >   "language": "python",
# >   "timestamp": "2021-03-02T01:06:16.209501971Z",
# >   "title": "test paste"
# > }

# 401 BAD_REQUEST
# wrong password
# 404 NOT_FOUND
# no paste with that ID found

Developing

when doing local backend development, make sure you change the backend address to be localhost. You can find this on Line 4 of frontend/src/http/shared.js

Common

make dev — starts React development server on :3000 and backend on :8080

Frontend

make fe-run — starts React development server on :3000

make fe-build — builds development release of frontend in frontend/build

Backend

make run — starts backend on :8080

make lint — lints all Go files

make docker-build — builds Docker image of current backend

make docker-run — runs built Docker image on :8080

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].