Skip to content

Instantly share code, notes, and snippets.

View heridev's full-sized avatar
🌠
Exploring GraphQL with the Github explorer

Heriberto Magaña heridev

🌠
Exploring GraphQL with the Github explorer
View GitHub Profile
@heridev
heridev / 999-circleci.yml
Last active October 27, 2022 19:30
Code for blog post - How to architect integration or End-to-end(E2E) or system tests for frontend Single Page Applications
View 999-circleci.yml
# Jest and Cypress(e2e) tests configuration for CircleCi
version: 2.1
orbs:
cypress: cypress-io/cypress@1
jest: blimmer/jest@1.1.1
executors:
with-cypress-node-14-17:
docker:
- image: cypress/base:14.17.0
jobs:
@heridev
heridev / amazon-bounces-management.md
Last active May 2, 2022 22:14
Elevated email bounce rates through your Amazon SES account
View amazon-bounces-management.md

Elevated email bounce rates through your Amazon SES account

In this article, I'm going to be sharing how we got notified of our elevated email bounce rates, how we made a first big reduction by enabling the suppression list functionality on AWS SES, and then how we were able to identify bounced accounts and the commands and CLI tools you can use for managing your suppression list.

It is Friday, and all of a sudden you receive an Amazon support email saying that your account has been moved under review. 😱

We placed your SES account in the US xxx (City) Region under review. You can still use this account to send emails, but you should fully address the problems that led to your account being placed under review.

So, what are the steps that we followed in order to fix this problem?

@heridev
heridev / 0_unique_data.md
Last active March 9, 2022 16:01 — forked from DmitryTsepelev/0_unique_data.md
Active record duplicates, prevent duplicates, benchmark on duplicates with active record, single file ruby with rails active record benchmark, single file benchmarking active record duplicates
View 0_unique_data.md
@heridev
heridev / content.md
Created October 13, 2021 00:29
Third party SAML Single Sign On (SSO) integration/implementation - Tech spec
View content.md

Third party SAML Single Sign On (SSO) integration/implementation - Tech spec

  • Author: Heriberto Perez

Background

The implementation of SSO in order to connect with other services/providers/sites is a common requirement these days

For those cases when you have the need to integrate a third party service and embed some widgets in your site, and in order to make it in a secure way and based on dynamic data for the current authenticated, that is when the SSO integration comes handy for you.

Goals

This Tech spec will serve as a reference a SAML Single Sign On (SSO) integration.

@heridev
heridev / exceptions.md
Last active August 11, 2018 15:24
Refactoring the app into MVP : Fourth part - Exceptions
View exceptions.md

Let's start changing the repository to trigger an exception(typo in the orderby clause):

DatabaseBooksRepository.java

public class DatabaseBooksRepository implements BooksRepository {
  private final DatabaseHelper databaseHelper;
  public DatabaseBooksRepository(Content context) {
   databaseHelper = OpenHelperManager.getHelper(context, DatabaseHelper.class);
  }
@heridev
heridev / third_part.md
Created August 11, 2018 14:50
Refactoring the app into MVP : Third part - Using Mockito
View third_part.md

Seems to be pretty simple to install so now let's start with some examples with the same BooksActivityPresenterTest

BooksActivityPresenterTest.java

import org.junit.Test;
import org.junit.Asserts;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
@heridev
heridev / second_part.md
Last active August 11, 2018 14:52
Refactoring the app into MVP : Second part
View second_part.md

Implementing the database thing

OpenHelperManager.java

/* this is not the complete example for the implementation
 but it is just a sample as I didn't write it all that
*/
public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
  private static final String DATABASE_NAME="Sniptit.rb";
@heridev
heridev / first_part.md
Last active August 11, 2018 14:46
Refactoring the app into MVP : First part
View first_part.md
@heridev
heridev / Unix Command
Last active June 27, 2017 19:14 — forked from vaquarkhan/Unix Command
most common unix command for development
View Unix Command
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
#####################################################
@heridev
heridev / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console