Skip to content

Instantly share code, notes, and snippets.

View huichops's full-sized avatar

Luis Argumedo huichops

View GitHub Profile
@huichops
huichops / animacionBasica.cpp
Created May 8, 2013 22:29
Animacion básica por frames y basada en el tiempo usando freeGlut y openGL.
#include "GL/freeglut.h"
#include "GL/gl.h"
#include <stdio.h>
double rotacion = 0.5, x = 0, velocidad = 180;
float rojo, verde, azul;
double delta;
int tiempoActual, tiempoAnterior;
void reshape(int width, int height){
#define GLUT_DISABLE_ATEXIT_HACK
#include <windows.h>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include <stdlib.h>
#include <stdio.h>
@huichops
huichops / ecuacion.php
Created June 7, 2013 06:20
cuadratic plot
<html>
<head>
<style>
* {
margin: 0;
padding: 0;
font-family: Helvetica, Arial;
}
input[type="submit"]{
transition-duration: 0.5s;
@huichops
huichops / autofill.js
Last active December 17, 2019 17:38
Script para autorellenar las encuestas del SIIAU
var c=document.querySelector("frame[name='mainFrame']").contentWindow.document.querySelector("#contenido").contentWindow.document.querySelectorAll("select"),container=document.querySelector("frame[name='mainFrame']").contentWindow.document.querySelector("#contenido").contentWindow.document.body,ov=document.createElement("div"),M=0,B=1,rA=document.createElement("a"),bA=document.createElement("a"),mA=document.createElement("a");ov.style.position="fixed";ov.style.width="200px";ov.style.height="100px";ov.style.bottom="0px";ov.style.right="0px";ov.style.padding="10px";ov.style.backgroundColor="rgba(210,30,0,0.8)";container.appendChild(ov);rA.href="#";bA.href="#";mA.href="#";rA.onclick=function(){fill();return false};bA.onclick=function(){fill(B);return false};mA.onclick=function(){fill(M);return false};rA.style.display="block";bA.style.display="block";mA.style.display="block";rA.innerHTML="Random";bA.innerHTML="Bien";mA.innerHTML="Mal";ov.appendChild(rA);ov.appendChild(bA);ov.appendChild(mA);function fill(type){if
@huichops
huichops / e_parallel.c
Created September 16, 2013 23:12
Calculo de el numero de Euler en paralelo con POSIX threads
/* * =====================================================================================
*
* Filename: e.c
*
* Description: Calculo del numero de Euler con hilos
*
* Version: 1.0
* Created: 11/09/13 16:54:45
* Revision: none
* Compiler: gcc
@huichops
huichops / canon_parallel.c
Last active December 24, 2015 02:38
Multiplicacion de matrices en paralelo con metodo de Canon
/*
* =====================================================================================
*
* Filename: canon.c
*
* Description: Multiplicacion de matrices con el algoritmo
* de Canon
*
* Version: 1.0
* Created: 22/09/13 10:36:18
@huichops
huichops / arboles.pl
Created October 30, 2013 03:17
Funciones de arboles binarios en prolog
arbol(nil).
arbol(a(_,HI,HD)):-
arbol(HI),arbol(HD).
contarNodos(nil, 0).
contarNodos(a(_,HI,HD),X):-
contarNodos(HI, A),
contarNodos(HD, B),
X is A+B+1.
@huichops
huichops / InstalarRubyWindows.md
Last active January 9, 2023 23:05
Instalacion de Ruby y Sinatra en Windows

Instalacion de Ruby en Windows

Instalar Ruby

  1. Primero vayan y bajen el instalador de ruby en windows Descargar Ruby Installer Bajen el instalador de la version 2.0.0 que corresponda a su arquitectura

  2. Abren el ejecutable Cuando esten instalando prendan el checkbox que dice

@huichops
huichops / whoIm.sh
Created November 26, 2013 03:49
Who con esteroides que muestra el tiempo conectado y colores
SLEEP=3
gray="\e[1;37;40m"
black="\e[0;30;47m"
header="\e[1;37;42m"
cend="\e[0m"
color=""
#vaciar archivos
rm who1
rm who2
@huichops
huichops / tests.md
Last active December 30, 2015 20:29 — forked from Almand/gist:7860760
Programador:

Armando Suárez Atilano

Fecha:

09/Noviembre

Módulo o sección:

Conexión a la base de datos

Descripción:

Realice pruebas de conexión a sqlite con un servidor local, aparentemente todo funciona a la perfección, queda pendiente la prubea con el host real, para ver si soporta sqlite o es necesario cambiarlo; por lo pronto todo funciona.