Skip to content

Instantly share code, notes, and snippets.

View hjgraca's full-sized avatar
🏠
Working from home

Henrique Graca hjgraca

🏠
Working from home
View GitHub Profile
@hjgraca
hjgraca / country-bounding-boxes.py
Created January 22, 2025 20:27 — forked from graydon/country-bounding-boxes.py
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@hjgraca
hjgraca / Function.cs
Created January 30, 2024 11:49
Powertools Logger ServiceCollection
public class Function
{
private readonly ILogger<Function> _logger;
public Function() : this(null)
{
}
// For testing
public Function(ILogger<Function>? logger)
#
# © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#
# The AWS assignment is confidential and shall not be disclosed publicly or to
# any third party. Provide your completed assignment as email attachment(s) in
# reply to the email providing the assignment. Do not share or make available
# your assignment with anyone other than Amazon. By returning your completed
# assignment, you agree that it is all your own work.
#
AWSTemplateFormatVersion: '2010-09-09'

Keybase proof

I hereby claim:

  • I am hjgraca on github.
  • I am hjgraca (https://keybase.io/hjgraca) on keybase.
  • I have a public key ASALrFJxgmIhoY9FmCZWSFcM2h17WFFoThfnAoL8BXcygAo

To claim this, I am signing this object:

@hjgraca
hjgraca / install.md
Last active April 11, 2020 04:26
Install Jekyll in WLS2

First let's update everything I am running all commands as sudo but you run with the level you want

sudo apt-get update -y && sudo apt-get upgrade -y

Now let's install Ruby

@hjgraca
hjgraca / async-await.js
Created February 24, 2017 13:20 — forked from wesbos/async-await.js
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}