Skip to content

Instantly share code, notes, and snippets.

View qgadrian's full-sized avatar
🛰️

Adrián Q qgadrian

🛰️
View GitHub Profile
@qgadrian
qgadrian / check_random_tests_fail.sh
Created November 24, 2023 09:23
Run Elixir mix tests several times to check which of them are failing randomly
#!/bin/bash
# Define the maximum number of test executions
MAX_EXECUTIONS=100
# Initialize a counter for test executions
executions=0
# Run the tests until one of them fails or the limit is reached
while [ $executions -lt $MAX_EXECUTIONS ]; do
@qgadrian
qgadrian / script-template.sh
Created August 2, 2023 07:26 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@qgadrian
qgadrian / femtasy_react_native_technical_assestment.md
Created December 8, 2020 18:31
Femtasy React Native technical assestment

Femtasy React Native technical assestment

Introduction

Write a simple front React Native application that consumes the Star Wars API and shows the content requested by the user.

Specifications

  • By default, the app will show the list of films
  • When users clicks on an element of the film list, show the following information:
@qgadrian
qgadrian / femtasy_frontend_challenge.md
Last active November 6, 2020 17:08
femtasy frontend challenge

Femtasy frontend technical test

Introduction

Write a simple front React application that consumes the Star Wars API and shows the content requested by the user.

Specifications

  • By default, the app will show the list of films
  • When users clicks on an element of the film list, show the following information:

Keybase proof

I hereby claim:

  • I am qgadrian on github.
  • I am qgadrian (https://keybase.io/qgadrian) on keybase.
  • I have a public key ASBu5sdGCLjARjQURnO-Bz_V_DNG4HjpAFnfcBqkLeTiiwo

To claim this, I am signing this object:

@qgadrian
qgadrian / svim.css
Created July 30, 2019 16:43
Svim css style
@-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
#sVim-command {
@qgadrian
qgadrian / elixir_alexa_4.exs
Created December 20, 2018 19:51
elixir_alexa_4.exs
import Mix.Config
config :tmdb,
api_key: "replace_this_with_your_tmdb_api_key"
@qgadrian
qgadrian / elixir_alexa_3.exs
Last active December 20, 2018 19:38
elixir_alexa_3.exs
defmodule ThemoviedbAlexa.Response.Spanish do
@moduledoc """
Module that provides an Alexa response to an intent in the spanish.
"""
@behaviour ThemoviedbAlexa.Response.Behaviour
@doc """
Returns an Alexa skill response with the rating info of a movie
"""
@qgadrian
qgadrian / elixir_alexa_2.exs
Last active December 20, 2018 19:32
elixir_alexa_2.exs
defmodule ThemoviedbAlexa do
@moduledoc """
Entrypoint for Alexa skill requests to the AWS lambda.
"""
require Logger
alias ThemoviedbAlexa.Response.{Spanish}
@tmdb_client Application.get_env(:themoviedb_alexa, :tmdb_client)
@qgadrian
qgadrian / elixir_alexa_1.exs
Created December 20, 2018 19:23
elixir_alexa_1.exs
defp deps do
[
{:credo, "~> 1.0.0", only: [:dev, :test], runtime: false},
{:aws_lambda_elixir_runtime, "~> 0.1.0", only: [:lambda]},
{:distillery, "~> 2.0"},
{:tmdb, git: "https://github.com/seanabrahams/elixir-tmdb.git"},
{:mox, "~> 0.4", only: :test}
]
end