Skip to content

Instantly share code, notes, and snippets.

View Ciscoox's full-sized avatar

Francisco Ventura Ciscoox

  • Mercadolibre
  • Chile, Santiago
View GitHub Profile
@Ciscoox
Ciscoox / lambda-s3-read-write-by-line.js
Created August 6, 2021 03:01 — forked from hboylan/lambda-s3-read-write-by-line.js
AWS Lambda function to read and write S3 files by line to perform efficient processing
const stream = require('stream')
const readline = require('readline')
const AWS = require('aws-sdk')
const S3 = new AWS.S3()
// read S3 file by line
function createReadline(Bucket, Key) {
// s3 read stream
const input = S3
@Ciscoox
Ciscoox / app.js
Created December 29, 2020 00:43 — forked from joshnuss/app.js
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@Ciscoox
Ciscoox / cloudSettings
Last active February 24, 2022 00:42
Telegram Web Layout - Material Desktop (WIP)
{"lastUpload":"2022-02-24T00:42:12.371Z","extensionVersion":"v3.4.3"}