Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / node_redis_cache.js
Created August 20, 2019 12:55
Node.js & Redis Caching
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
@sridharraman
sridharraman / change_permissions_script
Created March 3, 2014 10:27
Change permissions for folder and files recursively from the terminal
To change all the directories to 755 (-rwxr-xr-x):
find . -type d -exec chmod 755 {} \;
To change all the files to 644 (-rw-r--r--):
find . -type f -exec chmod 644 {} \;