This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to AWS EKS | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function asyncReduce(array, asyncReducerFunction, initialValue) { | |
let accumulator = initialValue; | |
for (const element of array) { | |
accumulator = await asyncReducerFunction(accumulator, element); | |
} | |
return accumulator; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let page = 15; | |
let pages = 50; | |
let pageNumbers = []; | |
for (let i = page - 3; i <= page + 3; i++) { | |
if (i < 1) continue; | |
if (i > pages) break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http.server | |
import socketserver | |
from http import HTTPStatus | |
class Handler(http.server.SimpleHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(HTTPStatus.OK) | |
self.end_headers() | |
self.wfile.write(b'Hello world') |