Skip to content

Instantly share code, notes, and snippets.

@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active September 13, 2025 08:52
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active October 17, 2025 20:13
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

@krystofbe
krystofbe / rename_phoenix_project.sh
Created March 8, 2019 11:46 — forked from kumekay/rename_phoenix_project.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="Zauberantrag"
CURRENT_OTP="zauberantrag"
NEW_NAME="Wunderantrag"
NEW_OTP="wunderantrag"
@josephan
josephan / setup_tailwind_in_phoenix.md
Last active September 5, 2025 05:26
Add Tailwind CSS to an Elixir/Phoenix Project with PurgeCSS
@pedrouid
pedrouid / webcrypto-examples.md
Created December 15, 2018 01:07
Web Cryptography API Examples
let UserContext = React.createContext();
class App extends React.Component {
state = {
user: null,
setUser: user => {
this.setState({ user });
}
};
@yang-wei
yang-wei / decode.md
Last active May 24, 2025 09:14
Elm Json.Decode tutorial and cheatsheet

When receiving JSON data from other resources(server API etc), we need Json.Decode to convert the JSON values into Elm values. This gist let you quickly learn how to do that.

I like to follow working example code so this is how the boilerplate will look like:

import Graphics.Element exposing (Element, show)
import Task exposing (Task, andThen)
import Json.Decode exposing (Decoder, int, string, object3, (:=))

import Http
@ygotthilf
ygotthilf / jwtRS256.sh
Last active October 16, 2025 08:14
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@ericelliott
ericelliott / essential-javascript-links.md
Last active June 14, 2025 18:43
Essential JavaScript Links