Skip to content

Instantly share code, notes, and snippets.

@hugodias
hugodias / interview-questions.md
Created January 11, 2021 13:25
Senior Developers Interview Questions

Technical questions

  1. What techniques would you use to make sure an API is reliable and scalabe for reading operations to support 1M requests a day with peak of 2000 concurrent users?
  2. You have just been put in charge of a legacy code project which is difficult to maintain – what would you plan to improve in order to make the project easier to maintain in the long-term?
  3. What is an acceptable response time for a ready-only API GET method in your opinion?
  4. What is dependency injection? What are the benefits of using it?
  5. Do you test your applications? What are the importance of tests in software development and the difference between each type of test? (Unit tests, E2E, Integration tests, Load Test)

Role-specific questions

  1. What metrics do you use to monitor a backend application performance?
  2. What metrics do you use to monitor your teams performance?
@hugodias
hugodias / authorizedApolloProvider.js
Created July 26, 2020 01:22
Authorize Apollo with Auth0 Access Token Claims
import React from 'react'
import {
ApolloClient,
ApolloProvider,
InMemoryCache,
createHttpLink,
} from '@apollo/client'
import { setContext } from '@apollo/link-context'
import Loading from './components/Loading'
@hugodias
hugodias / .htaccess
Created June 28, 2020 23:29
Multi Language WordPress htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(br|en|es)$ index.php?lang=$0 [L,QSA]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@hugodias
hugodias / post-mortem-template.md
Created April 9, 2020 14:59
Incident Post Mortem Template

Post-mortem (incident #1)

Date

2019-03-18

Status

Completed

Summary

@hugodias
hugodias / .htaccess
Last active November 22, 2019 14:54
WordPress Security Checklist
<IfModule mod_headers.c>
Header always set X-XSS-Protection "1; mode=block"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Content-Type-Options "nosniff"
Header always edit Set-Cookie (.*) "$1; HTTPOnly"
Header always edit Set-Cookie (.*) "$1; Secure"
</IfModule>
@hugodias
hugodias / hubspot_schema.html
Created January 31, 2019 10:12 — forked from lukebussey/hubspot_schema.html
HubSpot Blog Schema.org Markup
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"@id": "#organization",
"name": "Outlyer",
"url": "https://www.outlyer.com/",
"sameAs": [
"https://github.com/outlyerapp",
"https://twitter.com/outlyer",
@hugodias
hugodias / content-tag.php
Last active January 19, 2022 06:27
content_tag function in PHP to work as Rails content_tag function
<?php
/**
* @param $tag
*
* @return string
*/
function close_tag($tag)
{
return "</" . $tag . ">";
@hugodias
hugodias / postmortem.md
Last active November 22, 2018 23:22 — forked from mlafeldt/postmortem.md
Post mortem Siteground - All servers down

Siteground (incident #1)

Date

2018-11-22

Authors

  • Hugo
@hugodias
hugodias / class-csv.php
Created August 29, 2018 01:04
Export wordpress table data in CSV format
<?php
/**
* Class CSV
*
* Export any wordpress table in CSV format
*
* @author Hugo Dias <[email protected]>
* @since 2.0.0
* @example $csv = new CSV('posts'); // Will export wp-posts table
*

Keybase proof

I hereby claim:

  • I am hugodias on github.
  • I am hugodias (https://keybase.io/hugodias) on keybase.
  • I have a public key ASA7kVH998QnXA5NVATYEAVrLB-sahA9znxGxw0ge4YUygo

To claim this, I am signing this object: