Skip to content

Instantly share code, notes, and snippets.

Avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
@doi-t
doi-t / get_cloudwatch_logs_records_from_kinesis_stream.py
Last active Sep 25, 2019
CloudWatch Logs --> subscription filter --> Kinesis stream --> boto3.client('kinesis').get_records()
View get_cloudwatch_logs_records_from_kinesis_stream.py
import base64
import datetime
import gzip
import json
import sys
import time
from typing import Any, Dict, List
import boto3
View exkorpion_demo.exs
defmodule ExkorpionSamples.MathExamplesTest do
use Exkorpion
def sum a, b do
a + b
end
def subs a, b do
a - b
end
@ivancorrales
ivancorrales / first-steps-with-erlang.erl
Created Jan 29, 2016
Basic example of creating a record and iterating over a list of elements.
View first-steps-with-erlang.erl
-module(poc).
-export([all/0,say_hello/1]).
-record(person,{name,genre,age}).
new_person(Name, Genre, Age) ->
#person{name=Name, genre=Genre, age=Age}.
isOlderThanAveragePeople(Age,AverageAge)->
Age>=AverageAge.
@ivancorrales
ivancorrales / gist:d108cc0dccc1fad460ae
Created Dec 5, 2015
Avoiding using if-else statements
View gist:d108cc0dccc1fad460ae
function _ifElseFn(condition, cb, cb2){
var result = {true:cb,false:cb2};
return result[condition]();
}
function sayYourCarIsOld(){
console.log('your car is old');
}
function sayYourCarIsNew(){
@ivancorrales
ivancorrales / setUp.go
Created Jun 18, 2015
Go script to create workspace structure
View setUp.go
package main
import(
"fmt"
"os"
"runtime"
"path/filepath"
)