Skip to content

Instantly share code, notes, and snippets.

View juniorUsca's full-sized avatar

Junior Usca juniorUsca

View GitHub Profile
@juniorUsca
juniorUsca / html5-video-streamer.js
Last active July 3, 2019 21:07 — forked from paolorossi/html5-video-streamer.js
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
* https://stackoverflow.com/questions/24976123/streaming-a-video-file-to-an-html5-video-player-with-node-js-so-that-the-video-c
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
@juniorUsca
juniorUsca / fetch-rico.js
Created July 4, 2019 21:03
Fetch evaluaciones
const baseUrl = gcUrlBase.slice(0, -1)
const options = {
// descomentar para POST
// method: 'POST',
// body: JSON.stringify(data),
headers: {
'Content-Type': 'application/json',
AppRRHH: Cookies.get('AppRRHH'),
},
}
@juniorUsca
juniorUsca / index.php
Last active March 16, 2020 21:49
php memory allocation
<?php
class MemoryManager {
private $_buffer;
private $_allocation;
private $_numBytes;
private $_currentNumBytes;
function __construct(&$buffer, $numBytes) {
$buffer = array_fill(0, $numBytes, NULL);
@juniorUsca
juniorUsca / Screen Shot 2020-07-15 at 00.39.45.png
Last active July 15, 2020 05:44
Circuito comunicando 2 arduinos usando wire
Screen Shot 2020-07-15 at 00.39.45.png
@juniorUsca
juniorUsca / busqueda_binaria.py
Created February 3, 2021 22:30
busqueda_binaria
datos = [100,1,2,3,4,10,20,45,67,32]
buscar = 32
datos.sort()
print(datos)
inicio = 0
fin = len(datos) - 1
encontrado = False
import React from 'react'
import ReactDOM from 'react-dom'
import { useState } from 'react'
const App = () => {
const [ contador, setContador ] = useState({
izquierda: 0,
derecha: 0,
})