Skip to content

Instantly share code, notes, and snippets.

View charlires's full-sized avatar

Carlos Andonaegui charlires

  • Brightcove
  • Guadalajara, MX
View GitHub Profile
@charlires
charlires / README.md
Last active August 29, 2015 14:07
Docker Tutorial

Docker

Build once, configure once and run any where

Basic commands

Info

docker info

Search

docker search string

#Basic set up

APPS

DEV

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@charlires
charlires / bash.md
Last active August 31, 2016 21:00 — forked from khanh96le/bash.md
bash basic

Learn at this tutorial http://www.shellscript.sh/

1.HelloWorld

The first line

#!/bin/sh
echo 'hello world'

what is #!/bin/sh means?

  • It likely declare a environment to run the below shell.
@charlires
charlires / vim-config
Last active May 25, 2017 16:19
vim configuration
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
" COLORS
Plugin 'arcticicestudio/nord-vim'
" json formater
Plugin 'elzr/vim-json'
" status bar
@charlires
charlires / Golang.Dockerfile
Last active July 21, 2021 00:55
Dockerfiles
FROM golang:buster as build
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build \
-mod=vendor -ldflags "-s -w" -a -installsuffix cgo -o bin .
## Install shush
@charlires
charlires / datastructures.md
Last active July 13, 2021 17:57
C++ CheatSheet

Data Structures in CPP

MAP

// Init
map<char, int> m = {
    {'1', 1},
    {'2', 2},
    {'3', 3},
@charlires
charlires / errors.md
Last active April 6, 2022 18:01
Go Errors

Golang Errors

https://blog.golang.org/go1.13-errors

Error Handling

Don’t just check errors, handle them gracefully

Anti-patterns: 🚫

// shadowing the error with some meaningless message
if err != nil {
@charlires
charlires / utils.md
Last active July 21, 2021 01:17
Utils
# with_role bc-videocloud-prod arn:aws:iam::749779118921:role/dev-admin

function with_role() {
    >&2 echo "Generating Temporary Session Creds..."
    CREDS=$(aws sts assume-role \
      --profile $1 \
      --role-arn $2 \
      --role-session-name "${USER}-session" \
      --query Credentials \
@charlires
charlires / ionic.md
Last active August 5, 2021 03:40
react

ionic build

npx cap add android

ionic capacitor run android