Skip to content

Instantly share code, notes, and snippets.

View anaarezo's full-sized avatar
🫖
Tea?

Ana Arezo anaarezo

🫖
Tea?
View GitHub Profile
@anaarezo
anaarezo / waf.ts
Created June 12, 2024 13:21 — forked from statik/waf.ts
WAF with CDK examples
import * as cdk from "@aws-cdk/core";
import * as wafv2 from "@aws-cdk/aws-wafv2";
// This extends the base cdk stack properties to include a tag name input.
export interface StackProps extends cdk.StackProps {
tag: string;
applicationName?: string;
}
export class WAFStack extends cdk.Stack {
@anaarezo
anaarezo / ruby_update_version_issues.md
Last active October 24, 2023 10:22
Ruby Update Version - Issues of unlinked version

If you've updated Ruby on your Mac to version 2.7.7 but ruby -v still shows version 2.6.10, it's possible that you have multiple versions of Ruby installed on your system, and the system is still using the older version. You can follow these steps to ensure you're using the correct Ruby version:

  1. Check your Ruby versions: First, make sure that Ruby 2.7.7 is installed on your system. You can check this by running the following command:

    ruby -v

If it shows the wrong version (2.6.10), it means that the system is using the older Ruby version.

@anaarezo
anaarezo / gist:6e0766703f1b79b293dd8aea17ba8089
Created January 31, 2022 20:22
Group array of objects based in Date
const data = [
{ transactionStatus: 'PROCESSING', date: '2021-12-26T09:40:50', brand: 'MASTERCARD', transactionType: 'CREDIT', value: 500000,},
{ transactionStatus: 'RECEIVED', date: '2021-12-26T10:12:41', brand: 'MASTERCARD', transactionType: 'CREDIT', value: 500000,},
{ transactionStatus: 'CANCELED', date: '2021-12-26T10:12:41', brand: 'MASTERCARD', transactionType: 'CREDIT', value: 500000,},
{ transactionStatus: 'CANCELED', date: '2021-12-27T12:35:23', brand: 'MASTERCARD', transactionType: 'CREDIT', value: 500000,},
];
const groups = data.reduce((groups, sale) => {
const time = sale.date.split('T')[0];
@anaarezo
anaarezo / generate-sshkey.md
Last active February 11, 2020 21:08
How to generate SSH Key to put on GitHub
  1. Open the terminal and run the code below:
$ cat ~/.ssh/id_rsa.pub
  1. Copy the generated code, as example:
ssh-rsa AAADDDB3NzaC1yc2EAAAADAQABAAACAQDYEuGZGyrJZZW8+IsZhvbi4Mb/1alI8g6HCyxLBrL0EikwLVnskKSgDH2/t+Uayyf3jPJbV4lnG3ciKHAZZvuiXkh80YvrO+BxmAbWSZvk3ppcsypsYi+4T5cbJX5f3h5jfpYOhR1cNw1bj23jIBA6VEQgVFWMGA4vEomOc1AkHI5WUveGb/TSg1Zl5Q+4jIKaHfIRfE+Ykymaxp/TSol9lrrUUmhHngQmMVDEBI0NAIt60lkO4wBB2xvRLDTxKScXe2OPQ7YMG+trIPKQH2M8uS3fyc0wWwhOYx20OXc4bpiLLvoOOjFLWL26GBQgmST7NZeU83QcMuFCMMlhsfrCWJjYlghhrfWVWJezTJghJWiW2fpfqjJIYrtI2umNgZywxPWTebMo07fGLZHr5Dc4NWbPDzN+PtUmpE+lxHp68KlOun6eh+xEzuPIAxhpGV/bwjH9MeDlj9YMAgzhJy/ORM/S/CmI7pLVZR/mUD8IB4qbo7hePf5WCyWzyG98BGmkKlHyM+Lb5QotW8d+fDIm1NqObG5btzY5b15N/9VJXQkt8OVtc7StuXcWFj3Xyq300msLb+E/cF1ZX185Rn4pqYJH0OCCGCZXTtUo6MjZybWFskZVR5bJs0++13RfM0ruhY7Bvr3Yt7IySxp8AR6Yw1ZL5k4qt31HkyWvOf3k5w== laura.arezo@gmail.com