Skip to content

Instantly share code, notes, and snippets.

View mainawycliffe's full-sized avatar

Maina Wycliffe mainawycliffe

View GitHub Profile
import {
Component,
ElementRef,
EventEmitter,
Input,
OnInit,
Output,
ViewChild
} from '@angular/core';
import * as Croppie from 'croppie';
@mainawycliffe
mainawycliffe / list.txt
Created April 1, 2020 11:28 — forked from shortjared/list.txt
List of AWS Service Principals
acm.amazonaws.com
alexa-appkit.amazon.com
apigateway.amazonaws.com
application-autoscaling.amazonaws.com
appstream.application-autoscaling.amazonaws.com
appsync.amazonaws.com
athena.amazonaws.com
autoscaling.amazonaws.com
batch.amazonaws.com
channels.lex.amazonaws.com
@mainawycliffe
mainawycliffe / github_gpg_key.md
Created September 9, 2021 16:03 — forked from ankurk91/github_gpg_key.md
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@mainawycliffe
mainawycliffe / install command
Last active October 12, 2022 19:34
Running Golang Integration Tests for Third-party Services using Docker
go get -u github.com/ory/dockertest/v3
type Mail struct {
host string
port string
from string
password string
username string
}
func (m *Mail) Send(toEmails []string, subject string, body string) error {
address := fmt.Sprintf("%s:%s", m.host, m.port)
var (
SMTP_HOST = "localhost"
SMTP_PORT string
HTTP_PORT string
)
func TestMain(m *testing.M) {
// code to seup and teardown our tests
}
pool, err := dockertest.NewPool("")
if err != nil {
log.Fatalf("Could not connect to docker: %s", err)
}
resource, err := pool.BuildAndRun("mailhog-test-server", "./Dockerfile", []string{})
if err != nil {
log.Fatalf("Could not start resource: %s", err)
}
resource, err := pool.Run("mysql", "5.7", []string{"MYSQL_ROOT_PASSWORD=secret"})
if err != nil {
log.Fatalf("Could not start resource: %s", err)
}