Skip to content

Instantly share code, notes, and snippets.

View jeanbenitez's full-sized avatar
🇨🇴
Discovering 👨‍🚀

Jean Benitez jeanbenitez

🇨🇴
Discovering 👨‍🚀
View GitHub Profile
@jeanbenitez
jeanbenitez / TrackerTask.xml
Created January 12, 2022 22:25
Modified version of Roku RALE's TrackerTask file to allow Video node inspection
<?rokuml version="1.0" encoding="utf-8" ?>
<!--********** Copyright 2019 Roku Corp. All Rights Reserved. **********-->
<component name="TrackerTask" extends="Task">
<interface>
<field id="event" type="assocarray"/>
<field id="isExternallyExposed" type="boolean" value="true"/>
<function name="UIThread_init"/>
@jeanbenitez
jeanbenitez / settimeout.br
Created July 12, 2020 19:43
setTimeout in BrightScript
function setTimeout(funcName as string, timerConf as object)
timer = m.top.createChild("Timer")
timer.update(timerConf)
timer.ObserveField("fire", funcName)
timer.control = "start"
return timer
end function
@jeanbenitez
jeanbenitez / list-to-matrix.ts
Created May 7, 2019 15:25
Simple array to matrix algorithm with Typescript
/**
* Convert simple array into two-dimensional array (matrix)
*
* @param list The array
* @param width The num of elements per sub-array
* @return the new matrix
*/
export const listToMatrix = <T>(list: T[], width: number): T[][] => {
const matrix = [];
@jeanbenitez
jeanbenitez / conventional_commits.md
Created November 8, 2018 22:22 — forked from humatios/conventional_commits.md
How to Write a Git Commit Message

Conventional Commits

Summary

The commit message should be structured as follows:


<Emoji> <type>(<scope>): <subject>
|&lt;---- Using a Maximum Of 50 Characters ----&gt;|

My Windows 10 wouldn't recognize my phone. After using adb it now works. Here's how.

  • Connect your Android phone via USB
  • When it asks what to connect as, choose "Camera (PTP)"
  • Open Google Chrome and the webpage you want to test
  • Open Chrome Developer Tools and find the "Remote Devices" tab

Now, your phone might or might not appear in this tab.
On my OS X and Fedora, it did. On Windows I had to get Android Debug Bridge ("ADB"):

@jeanbenitez
jeanbenitez / tda_cola.cpp
Created March 16, 2017 03:40
Definición del TDA Cola y un ejercicio práctico (Ahorcado)
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
typedef struct cola{
char dato; // 'char' para guardar un caracter. para enteros cambienlo a 'int'
int pos; // Le añadiremos esta variable para saber la posición de la letra en la palabra original
struct cola * sig;
} Cola;
@jeanbenitez
jeanbenitez / ejercicio_practica_pilas.cpp
Created March 16, 2017 03:36
EJERCICIO: Dada una pila con elementos repetidos realizar un algoritmo que busque un elemento en la pila y elimine todos los elementos repetidos dentro de la pila.
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
typedef struct pila{
int dato;
struct pila * sig;
} Pila;
void apilar(Pila ** tope, int d){
@jeanbenitez
jeanbenitez / lista_simple.cpp
Created March 16, 2017 03:33
Lista Simple: Pequeño algoritmo para insertar una cantidad n de nodos, y luego ordenarla.
#include <stdio.h> // Esta libreria tiene funciones de entrada y salida printf y scanf
#include <stdlib.h> // Esta tiene los metodos de malloc y varios mas
#include <conio.h> // De esta libreria solo usamos el getch() del final
// Se define el tipo de dato de cada nodo de las listas
// Esto solo define un molde o maqueta, no un nodo
struct lista{
int dato;
struct lista * sig;
};
@jeanbenitez
jeanbenitez / apuntadores-basico.cpp
Created March 16, 2017 03:31
Apuntadores en C/C++
#include <stdio.h>
#include <conio.h>
/*
APUNTADORES EN C/C++
- Definir un apuntador: tipo * nombreVariable. Ejemplo: int * a (Un apuntador a variables de tipo int llamada 'a')
- El operador & significa "dirección de"
- El operador * significa "Valor de lo que apunta"
*/