Skip to content

Instantly share code, notes, and snippets.

View fernandozamoraj's full-sized avatar

Fernando Zamora fernandozamoraj

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <string.h>
void print_at_xy(int x, int y, char *val);
void display_score();
void init();
int zero_lives();
@fernandozamoraj
fernandozamoraj / matrix-multiplication-js
Last active September 21, 2017 21:06
Multiply Matrices
function multiplyMatrix(A, B){
console.log("****MULTIPLY****")
let aRows = A.length
let aCols = A[0].length
let bRows = B.length
let bCols = B[0].length
let C = []
let i = 0
package com.fzj.app;
import java.util.*;
public class FreakCracker {
public String crack(String message){
int i = 0 ;
@fernandozamoraj
fernandozamoraj / firebasequicksample.html
Last active August 25, 2017 20:00
FirebaseQuickSample
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.3.0/firebase.js"></script>
var numbers = [1,2,3,6,8,3,4,6,78,10,11,9,1,3,4]
function filter(arr, filterCheck){
var newArray = []
for(var i=0;i<arr.length;i++){
if(filterCheck(arr[i])){
@fernandozamoraj
fernandozamoraj / jsinheritance.js
Created June 5, 2017 10:16
Prototypal Inheritance
function Person(firstname, lastname){
this.firstname = firstname;
this.lastname = lastname;
}
function Teacher(firstname, lastname, subject){
Person.call(this, firstname, lastname);
this.subject = subject;
}
<!DOCTYPE html>
<html>
<head>
<title>Knockout Demo</title>
</head>
<body>
<div data-bind="text: firstName">fern</div>
<div data-bind="text: lastName">zamora</div>
@fernandozamoraj
fernandozamoraj / Js not working
Last active April 16, 2017 19:31
Js is it working and I don't know why
console.log(this);
(function(g, $) {
function MyRealLib(){
return function(s){
console.log(s);
};
}
@fernandozamoraj
fernandozamoraj / monitor_ip_change.py
Last active March 31, 2017 04:46
This script can be used to help you monitor your box's IP. That way you always know what IP to remote into.
import socket
import smtplib
import sys
from time import sleep
from email.mime.text import MIMEText
FILE_NAME = '/dev/last_known_ip.dat'
TIME_INTERVAL = 600 #600 = 10 minutes
@fernandozamoraj
fernandozamoraj / binarytree.pde
Created January 27, 2017 03:16
Creates a binary tree and draws it using Processing.
/*
Author: Fernando Zamora
Description:
In this program I will attempt to draw out a binary search tree from N random values
*/
int currentIndex = 0;