Skip to content

Instantly share code, notes, and snippets.

View ivancorrales's full-sized avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
@jc-torresp
jc-torresp / raspberry-pi-plex-server.md
Last active April 3, 2024 13:36
Setup a Raspberry Pi Plex Media Server (Including external storage media and Windows to Raspbian migration)

Raspberry Pi Plex Server

Installation

Ensure our operating system is entirely up to date:

sudo apt-get update
sudo apt-get upgrade
@doi-t
doi-t / get_cloudwatch_logs_records_from_kinesis_stream.py
Last active September 25, 2019 21:17
CloudWatch Logs --> subscription filter --> Kinesis stream --> boto3.client('kinesis').get_records()
import base64
import datetime
import gzip
import json
import sys
import time
from typing import Any, Dict, List
import boto3
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 January 29, 2016 06:29
Basic example of creating a record and iterating over a list of elements.
-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 December 5, 2015 06:53
Avoiding using if-else statements
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 June 18, 2015 09:40
Go script to create workspace structure
package main
import(
"fmt"
"os"
"runtime"
"path/filepath"
)