Skip to content

Instantly share code, notes, and snippets.

@hugodias
hugodias / interview-questions.md
Created Jan 11, 2021
Senior Developers Interview Questions
View interview-questions.md

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 Jul 26, 2020
Authorize Apollo with Auth0 Access Token Claims
View authorizedApolloProvider.js
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 Jun 28, 2020
Multi Language WordPress htaccess
View .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 Apr 9, 2020
Incident Post Mortem Template
View post-mortem-template.md

Post-mortem (incident #1)

Date

2019-03-18

Status

Completed

Summary

@hugodias
hugodias / .htaccess
Last active Nov 22, 2019
WordPress Security Checklist
View .htaccess
<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 Jan 31, 2019 — forked from lukebussey/hubspot_schema.html
HubSpot Blog Schema.org Markup
View hubspot_schema.html
<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 Jan 27, 2019
content_tag function in PHP to work as Rails content_tag function
View content-tag.php
<?php
/**
* @param $tag
*
* @return string
*/
function close_tag($tag)
{
return "</" . $tag . ">";
@hugodias
hugodias / postmortem.md
Last active Nov 22, 2018 — forked from mlafeldt/postmortem.md
Post mortem Siteground - All servers down
View postmortem.md

Siteground (incident #1)

Date

2018-11-22

Authors

  • Hugo
@hugodias
hugodias / class-csv.php
Created Aug 29, 2018
Export wordpress table data in CSV format
View class-csv.php
<?php
/**
* Class CSV
*
* Export any wordpress table in CSV format
*
* @author Hugo Dias <hugoodias@gmail.com>
* @since 2.0.0
* @example $csv = new CSV('posts'); // Will export wp-posts table
*
View keybase.md

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: