Skip to content

Instantly share code, notes, and snippets.

View EdyVision's full-sized avatar

Eidan Rosado EdyVision

View GitHub Profile
# MIT License
#
# Copyright (c) 2025 Eidan J. Rosado
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@EdyVision
EdyVision / release.yml
Last active June 28, 2023 21:40
A GitHub workflow that automatically creates a tag and release based on poetry version mismatch (publishes to GitHub and Pypi)
# Automatically creates a new tag, GitHub release, and PyPi release if poetry version doesn't match last release version
name: Release
on:
workflow_dispatch:
branches:
- main
push:
branches:
version: '3.8'
services:
mongo:
image: mongo
restart: always
ports:
- 27017:27017
bookapi:
image: bookapi
@EdyVision
EdyVision / launch.json
Created July 8, 2019 01:38
VSCode Debugger Configurations for Serverless Projects
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type":"node",
"request":"launch",
"name":"Serverless Offline Debug",
@EdyVision
EdyVision / drugSearchController.test.js
Last active July 23, 2019 00:56
Drug Search Controller Test with Sinon Spy
/* eslint-disable no-undef */
/* eslint-disable no-unused-vars */
const expect = require('chai').expect;
const sinon = require('sinon');
let drugSearchCtrl = require('../../functions/drugSearch/drugSearchCtrl');
let nlmSearch = require('../../functions/drugSearch/services/nlmSearch');
describe('drugSearchCtrl getDrugIdentifiers', function drugSearchCtrlTest() {
// NLM Drug Search Service Spy
@EdyVision
EdyVision / mocha.opts
Created June 30, 2019 21:22
Mocha Opts File
--timeout 5000
--reporter list
--ui bdd
--exit
test/bootstrap.test.js
test/**/*.test.js
test/**/**/*.test.js
@EdyVision
EdyVision / bootstrap.test.js
Last active July 8, 2019 00:25
Serverless Test Bootstrapping File
/* eslint-disable no-undef */
const { spawn } = require('child_process');
const slsOfflineTestConfig = require('./support/slsOfflineTestConfig');
let slsOfflineProcess;
before(function(done) {
// increase mocha timeout for this hook to allow sls offline to start
this.timeout(30000);
@EdyVision
EdyVision / slsOfflineTestConfig.js
Last active July 8, 2019 00:26
Serverless Offline Port for Tests
module.exports.getSlsOfflinePort = () => {
return process.env.PORT || '3005';
};
@EdyVision
EdyVision / .eslintrc.js
Created June 30, 2019 20:17
Sample eslintrc Config File
module.exports = {
"extends": ['eslint:recommended'], // extending recommended config and config derived from eslint-config-prettier
"plugins": ['prettier'], // activating esling-plugin-prettier (--fix stuff)
"rules": {
'prettier/prettier': [ // customizing prettier rules (unfortunately not many of them are customizable)
'error',
{
"singleQuote": true,
"trailingComma": 'none',
"useTabs": false,
@EdyVision
EdyVision / .travis.yml
Last active July 1, 2019 00:49
Travis Configuration for Serverless NodeJS Projects
language: node_js
node_js:
- "10"
cache:
directories:
- node_modules
install:
- npm install -g serverless