Skip to content

Instantly share code, notes, and snippets.

View apotox's full-sized avatar
📚
reading

Safi eddine apotox

📚
reading
  • Software Engineer
  • berlin
  • 05:00 (UTC +02:00)
View GitHub Profile
@apotox
apotox / setInterval.go
Last active August 8, 2023 02:02
GoLang ⏱ setInterval alternative
package main
import (
"fmt"
"reflect"
"time"
)
// setInterval call p function every "interval" time
func setInterval(p interface{}, interval time.Duration) chan<- bool {
@kingkool68
kingkool68 / index.js
Created November 14, 2017 18:33
AWS Lambda Function for Proxying Requests to S3
/**
* This is a simple AWS Lambda function that will look for a given file on S3 and return it
* passing along all of the headers of the S3 file. To make this available via a URL use
* API Gateway with an AWS Lambda Proxy Integration.
*
* Set the S3_REGION and S3_BUCKET global parameters in AWS Lambda
* Make sure the Lambda function is passed an object with `{ pathParameters : { proxy: 'path/to/file.jpg' } }` set
*/
var AWS = require('aws-sdk');