Skip to content

Instantly share code, notes, and snippets.

View federico-garcia's full-sized avatar

Federico Garcia federico-garcia

  • Propelus
View GitHub Profile
@federico-garcia
federico-garcia / aws-cloud-practitioner.md
Created November 25, 2022 20:33
AWS Certified Cloud Practitioner (CLF-C01)

based on this course

AWS Certified Cloud Practitioner (CLF-C01)

@federico-garcia
federico-garcia / building-api-gin.md
Last active November 2, 2021 06:52
Building an API with Gin

Gin Web Framework

Installation

First, you need to have Go installed. Follow the instructions here. Or simply use brew:

brew install go
go version

Setting up the project

@federico-garcia
federico-garcia / ultimate-go-programming.md
Last active October 29, 2021 01:27
Ultimate Go Programming
@federico-garcia
federico-garcia / devsecops-essentials.md
Last active August 25, 2021 03:42
DevSecOps Essentials

DevSecOps Essentials

Based on this course

Introduction

DevSecOps build on the idea that cross-functional teams must work together and that everyone is responsible for security. The DevOps mantra of "automate everything" is central to DevSecOps. Areas where we can automate security:

  • Software version control
  • Continuous integration
  • Continuous testing
  • Configuration management and deployment
  • Continuous monitoring

The JavaScript Universe

based on this course

Values and Code

Numbers and strings are values. Objects and functions are values, too. Our code interacts with values, but values exist in a completely separate space. My code contains instructions like “make a function call,” “do this thing many times,” or even “throw an error.” I might refer to values in my code, but they don’t exist inside my code.

Values

  • Primitive Values. They can be numbers and strings, among other things
    • Undefined (undefined), used for unintentionally missing values.
@federico-garcia
federico-garcia / kubernetes-app-development-guide.md
Last active December 6, 2021 20:43
kubernetes tooling, app development and deployment

Concepts

Cloud Native apps = cloud + orchestration + containers

Local k8s cluster

Installing a k8s cluster on your machine

-- install k8s cli-tool kubectl for sending commands to k8s API server
-- you may want to alias kubectl to something shorter like k. Add alias k=kubectl 
-- in your bash|zsh profile
@federico-garcia
federico-garcia / consul-glossary.md
Created July 20, 2017 13:29 — forked from g0t4/glossary.md
Consul and related terms
  • Node - a physical or virtual machine that hosts services
    • Nodes also referred to as members.
    • Examples
      • Your computer
      • An AWS EC2 instance
      • A bare metal machine in your private data center
  • Service - executing software that provides utility via an interface
    • Typically long-lived process listening on a port(s)
    • Examples
  • A web server (nginx, apache, iis)
@federico-garcia
federico-garcia / consul.md
Last active September 27, 2020 17:53
Getting started with Consul

Consul

Consul provides a solution to the following challenges:

  • Service Discovery. It acts as an internal DNS server. No more internal load balancers?
  • Failure Detection. Health checking. It automatically removes failed nodes and services from the DNS response it gives to clients. Consul runs an agent in each server which are in charge of the health of all local services, by doing this, it distribute the health checking task. Agents talk to each other to share information about the services/nodes they are monitoring, adding or removing nodes or services as they become available or start failing.
  • Multi Datacenter. Consul is multi datacenter aware so you can have services available in multiple datacenters but using consul you can connect to locally deployed services in the same datacenter where the request is being originated, instead of going to the other datacenter for no reason. Datacenter is a logical concept. Talks to local services first and failover to ther datacenters if it needs to.
@federico-garcia
federico-garcia / oracle-troubleshooting.md
Last active July 18, 2017 16:29
Oracle Troubleshooting

Oracle

Are there any sessions blocking other sessions in the DB? Blocking session is the cause of lot of ACTIVE sessions in the DB and represent 2 or more sessions trying to touch the same data. We need to avoid this situation.

SELECT s1.username || '@' || s1.machine
    || ' ( SID=' || s1.sid || ' )  is blocking '
    || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status,
    st1.sql_text statment_1,
    st2.sql_text statment_2  
    FROM v$lock l1, v$session s1, v$lock l2, v$session s2, sys.v_$sql st1, sys.v_$sql st2

cyclic redundancy check. crc32 is supposed to be faster than shasum, you should only use shasum if the output of crc32 for two files is equal, otherwise, you are safe to say the two files are not equal.

crc32 /path/to/file
md5 file.iso
md5 /path/to/file

shasum -a 1 file.iso