Skip to content

Instantly share code, notes, and snippets.

@harsh4870
harsh4870 / redis-statfulset.yaml
Created June 9, 2019 20:24
Redis rejson statefulset deployment on kubernetes
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
ports:
- port: 6379
name: redis
clusterIP: None
selector:
@lucasalvessouza
lucasalvessouza / install_postaman.sh
Created February 19, 2019 19:47
Install postman fedora
#!/bin/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman-linux-x64.tar.gz
sudo tar xvzf postman-linux-x64.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat << EOF > ~/.local/share/applications/postman2.desktop
[Desktop Entry]
Name=Postman
GenericName=API Client
@outbreak
outbreak / lens.js
Last active June 9, 2020 11:13
Functional Lenses
// Operators
const eq = (a) => (b) => a === b
// Types
const typeOf = (a) => typeof a
const isArray = (a) => Array.isArray(a)
const isUndefined = (a) => eq('undefined')(typeOf(a))
// Lists
const reverse = (xs) => xs.reverse()
@nikmartin
nikmartin / A: Secure Sessions Howto
Last active April 28, 2024 05:17
Secure sessions with Node.js, Express.js, and NginX as an SSL Proxy
Secure sessions are easy, but not very well documented.
Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy:
The desired configuration for using NginX as an SSL proxy is to offload SSL processing
and to put a hardened web server in front of your Node.js application, like:
[NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [PUBLIC INTERNET] <-> [CLIENT]
Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now.