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 / BinaryTree.js
Created November 22, 2018 00:23 — forked from benlesh/BinaryTree.js
A simple Binary Tree implementation in JavaScript
/**
* Binary Tree
* (c) 2014 Ben Lesh <[email protected]>
* MIT license
*/
/*
* A simple Binary Tree implementation in JavaScript
*/
@fernandozamoraj
fernandozamoraj / findfz.py
Created December 10, 2018 18:52
This gist is a python script to find text in files in a given directory... useful for searching log files. Grep works better but sometimes not a windows as well
#usage
# ./findfz directory filefilter searchWord [searchWord2] [searchWord3] [searchWord4]
import glob
import sys
directory = "."
fileFilter = "*.*"
if len(sys.argv) > 3:
import java.awt.*;
class Window extends Frame{
Window(){
setSize(800,900);//frame size 300 width and 300 height
setLayout(null);//no layout manager
setVisible(true);//now frame will be visible, by default not visible
g++ -g -std=c++11 mymain.cpp ./subfolder/myutil.cpp ./subfolder/myutil2.cpp -o myprogram.exe
./myprogram.exe
valgrind ./myprogram.exe
@fernandozamoraj
fernandozamoraj / PriorityQueue.cpp
Created March 31, 2019 00:58
Priority queue using heao
#include<iostream>
#include<string>
using namespace std;
template <class T>
class PriorityQueue{
private:
T *_array;
var _q = 'fz.default.q';
let _conn = false
let _sendChannel = false
let _server = "amqp://localhost"
let _userName = ""
let _password = ""
let _onConsume = setMessage
let _connectionIsEstablished = false
import urllib.request
import ctypes
import time
from datetime import datetime
page_name = "my page" #change to what you want your message to display
page_url = "https://www.google.com" #change to your website...
start_time = datetime.now();
failure_count = 0
#this is a comment
#this is an array assignment
numbers = [0,1,2,3,4,3,5,6,7,8]
#this is an array assignment from a range
puts "*****Numbers******"
numbers.each{|number| puts number}
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
//this code must be run in an unix env
int main(int argc, char *argv[]){
pid_t pid;