Skip to content

Instantly share code, notes, and snippets.

View coreysyms's full-sized avatar

Corey Snyder coreysyms

View GitHub Profile
@coreysyms
coreysyms / gist:6ab4d093cf0a3d7ef94a284a95d1c9b4
Last active May 30, 2024 19:15
Nuxt ELB Error: /var/app/staging/dist: no such file or directory
The problem is that ELB is seeing an aliased folder in the build.
Chances are it's dist from an accidental npm run generate command.
Remove the alias folder, and you remove the problem.
I have also seen this happen with modules on RARE occasions.
@coreysyms
coreysyms / gist:8cce068150d1be3a1aa916dacaebe2d3
Created October 25, 2023 15:39
AWS ElasticBeanstalk Nuxt.js OpenSSL 3 error
From https://medium.com/the-node-js-collection/node-js-17-is-here-8dba1e14e382
we can see this issue is due to Open SSL 3.0
From the article:
"If you hit an ERR_OSSL_EVP_UNSUPPORTED error in your application with Node.js 17, it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0. A new command-line option, --openssl-legacy-provider, has been added to revert to the legacy provider as a temporary workaround for these tightened restrictions."
###To Fix###
Nuxt / Node 18 being deployed on AWS Elastic BeanStalk. I needed to create a predeploy hook with the flag to get it to run. package.json scripts update did not work for me. But the below method did.
@coreysyms
coreysyms / nuxt.config.ts
Last active March 2, 2023 20:42
Nuxt 3 SSR Deploy for AWS Elastic Beanstalk (ELB)
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {},
"nitro":{
"preset":"node-server",
}
})
@coreysyms
coreysyms / deploy.sh
Created October 16, 2019 03:06 — forked from leesmith/deploy.sh
Sync Nuxtjs dist folder to S3 and invalidate Cloudfront distribution
#!/usr/bin/env bash
#
# Sync generated site to S3 and invalidate Cloudfront distribution
if [ ! -f .env ]; then
echo "# Project environment variables...do not commit this file." >> .env
echo "AWS_CF_DIST_ID=" >> .env
echo "AWS_S3_URI=" >> .env
echo "Please add the necessary values to the .env file."
else
@coreysyms
coreysyms / google-ss-gen.cfm
Created January 5, 2018 19:13
Google Spreadsheet Generation Loop
<cfset start = now()>
<!--- collect all the users into an array --->
<cfset userArray = ArrayNew(1)>
<!--- 2 item array to toggle back and forth for each user createing 2 SS for 1 user --->
<cfset templateArray = ["REDACTED","REDACTED","REDACTED"]>
<cfset ssFoldersArray = ["REDACTED","REDACTED","REDACTED"]>
<cfset questionTitles = ["Work Streams","Project Budget Estimate","Testing Phase Budget Estimate"]>
<cfset quesitonObjectIds = ["1","2","3"]>
@coreysyms
coreysyms / googlescripts.js
Created June 7, 2017 18:48
Google Spreedsheet Scripts code
function doGet(e) {
//grab the id passed in of the google ss that I want to duplicate
var id = e.parameter.id;
var name = e.parameter.name;
//get the spreadsheet we want to duplicate and create a new sheet
var duplicateSS = SpreadsheetApp.openById(id);
//copy in the template to the new sheet and name it
var newSheet = duplicateSS.copy(name).getId();
/* ------------------------------------------------------------ *\
Pagination
\* ------------------------------------------------------------ */
.pagination-previous a:before,
.pagination-previous.disabled:before { content:normal; }
.pagination-previous a:after,
.pagination-previous.disabled:after { content:" PREV"; }
.pagination-next a:before,
.pagination-next.disabled:before { content:"NEXT "; }
<!---
getQuery() query Returns the entire recordset.
getRecordSet() query Returns the entire recordset.
getTotalRecords() numeric Returns the number of records in the entire recordset.
getPageFrom() numeric Get the start page of the pagination loop.
getPageTo() numeric Get the end page of the pagination loop.
getRecordsPerPage() numeric Returns the number of records to be displayed per page.
getCurrentPage() numeric Get the current page.
getTotalPages() numeric Get the total number of pages.
getFirstPage() numeric Get the first page in the pagination loop.
@coreysyms
coreysyms / gist:4597500
Created January 22, 2013 19:21
Sticky Footer Using Foundation
Check out this simple sticky footer here http://tangerineindustries.com/download/sticky_footer/