Skip to content

Instantly share code, notes, and snippets.

View roshane's full-sized avatar
🤘

roshane roshane

🤘
View GitHub Profile
@roshane
roshane / Mi_Js_CheatSheet.js
Last active April 11, 2023 12:55
javascript cheats
//flatten array (if `flat` is missing)
const flatten = (input) => {
return input.reduce((a,c)=>{
return util.isArray(c) ? a.concat(flatten(c)) : a.concat(c);
},[]);
}
//module exports shortcut
@roshane
roshane / PagedRequest.scala
Last active March 19, 2020 09:07
custom akka-http directive for pagination
//request response model
case class PageRequest(page: Int, size: Int)
case class PageResponse[T](page: Int, size: Int, totalPages: Int, data: Seq[T])
//sample routes
private val routes = path("echo") {
@roshane
roshane / validation-engine.scala
Last active June 20, 2019 15:50
validation engine template
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
trait Request
case class AdhocCreateRequest(name: String) extends Request
case class RegularCreateRequest(name: String) extends Request
class Repository {
@roshane
roshane / README.md
Created January 26, 2018 04:16 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed