Skip to content

Instantly share code, notes, and snippets.

View mcka1n's full-sized avatar

Edwin Maldonado mcka1n

View GitHub Profile
@trepichio
trepichio / deploy_nestjs.md
Last active July 17, 2024 07:35
How to Deploy NestJS Application?: The Platform Generic Steps

How to Deploy NestJS Application?: The Platform Generic Steps

  • [OPTIONAL] Modify src/main.ts to enable CORS:
async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.enableCors();
  await app.listen(process.env.PORT || 3000);
}
@raffi-minassian
raffi-minassian / s3copy-across-aws-accounts.js
Last active December 23, 2020 02:57
Quick and dirty script to copy files in AWS S3 to an S3 bucket in another AWS account with Node.js.
/*
* This is a quick and dirty script for copying files in AWS S3 to other buckets.
* This is written so it can work across AWS accounts.
* You can hack in code to apply work or logic to each file.
*
* For each file, it downloads locally to a tmp file and then starts uploading as soon as possible
* and deletes the file immediately when the upload is done.
*
* Best way to use: Spin up a micro in EC2, install node.js,
* create a directory and install the dependencies with
@codespore
codespore / CORS with Rails Devise
Created August 31, 2012 23:49
Sench Touch with Rails
References:
http://blog.carbonfive.com/2012/02/27/supporting-cross-domain-ajax-in-rails-using-jsonp-and-cors/
https://github.com/cyu/rack-cors
http://nelm.io/blog/2011/11/cors-with-sencha-touch/
http://jessehowarth.com/2011/04/27/ajax-login-with-devise
=============================================================================================================
GEMFILE
=============================================================================================================
gem 'rack-cors', :require => 'rack/cors'
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')