Skip to content

Instantly share code, notes, and snippets.

View Macorreag's full-sized avatar
😎
Writing better code every day

Miller Correa Macorreag

😎
Writing better code every day
View GitHub Profile
@Macorreag
Macorreag / untitled0.ipynb
Last active October 2, 2020 21:53
GPU of Colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Macorreag
Macorreag / untitled0.ipynb
Last active October 1, 2020 15:59
Pi with Cuda.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Macorreag
Macorreag / factorial.pl
Created May 29, 2019 17:31
factorial en prolog
factorial(0,1).
factorial(N,M):-N>0, N1 is N-1,factorial(N1,M1),M is N*M1.
@Macorreag
Macorreag / fibo.pl
Created May 29, 2019 17:33
fibonacci en prolog
fibo(0,1).
fibo(1,1).
fibo(N,M):-N>0,N1 is N-1,N2 is N-2,fibo(N1,M1),fibo(N2,M2),M is M1+M2.
@Macorreag
Macorreag / fibonaci.pl
Created May 29, 2019 17:55
fibonacci prolog recurcion hacia adelante
fibo(0,1).
fibo(1,1).
fibo(N,M):- +N>1,r(2,1,2,N,M).
r(I,B,_,N,B) :- I>N.
r(I,B,C,N,M) :- I=<N,I1 is I+1,D is C+B,r(I1,C,D,N,M).
@Macorreag
Macorreag / mpi_HelloWorld.c
Created June 11, 2019 12:32
Hello World with MPI
/*
* compile with : mpicc -o helloworld mpi_HelloWorld.c
* run with mpirun -np [#Number of Cores] helloworld
*/
#include <stdio.h>
#include "mpi.h"
int main(int argc,char **argv){
int rank,size;
@Macorreag
Macorreag / mpi-hosts
Last active June 11, 2019 13:30
MPI with omp for calculate Pi
# The Hostfile for Open MPI
# The master node, 'slots=4' is used because it is a dual-processor machine.
localhost slots=8
# The following slave nodes are single processor machines:
#cluster-nodo1
#cluster-nodo2
@Macorreag
Macorreag / Commands.sh
Created June 15, 2019 22:39
Comandos para instalar typo3 en Ubuntu 16.04
unzip typo3_src-8.7.26.zip -d /var/www/html/
cd /var/www/html/
sudo mv typo3_src-8.7.26/ test
ls -l test
chown www-data:www-data -R test
chmod -R 775 test
locate php.ini
@Macorreag
Macorreag / sshconect.md
Last active November 5, 2020 00:38
Máquinas virtuales con entorno gráfico ó mediante SSH.md

Maquina remota en Google Cloud Platform con Interfaz Grafica mediante NoMachine 💻

Transferencia de archivos a maquina en GCP

Puede transferir archivos a la maquina remota mediante scp de la siguiente manera

scp nomachine_6.3.6.1_amd64.deb [userMachine]@[IpMachine]:~/

donde:

@Macorreag
Macorreag / inyection.sql
Last active June 28, 2019 00:59
Inyección de SQL en pagina de prueba BadStore.net montada en VirtualBox
config red of Vbox
(Red->adaptador1->Adaptador solo anfitrion->unico que hay )
Modify ip access to
etc/hosts
write->[ifconfig on ubuntu IP public] www.badstore.net
Inyection of SQL
First login with