Skip to content

Instantly share code, notes, and snippets.

View LukeMS's full-sized avatar

Lucas de Morais Siqueira LukeMS

View GitHub Profile
@LukeMS
LukeMS / cherrypy_static_server.py
Last active November 10, 2021 21:47
Simple CherryPy Static Server
"""Simple CherryPy Static Server."""
import os
import os.path
import cherrypy
import cgi
FILES_DIR = "D:/Books"
ORDERED_LIST = False
@LukeMS
LukeMS / auto-deploy_documentation.md
Last active November 21, 2017 11:13 — forked from vidavidorra/auto-deploy_documentation.md
Auto-deploying Doxygen documentation to gh-pages with Travis CI

Auto-deploying Doxygen documentation to gh-pages with Travis CI

This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages branch using Travis CI. This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.

Sign up for Travis CI and add your project

Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.

Create a clean gh-pages branch

To create a clean gh-pages branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th

@LukeMS
LukeMS / folder_checksum.c
Last active November 5, 2017 12:11
allegro5
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <zlib.h> // for the adler-32 checksum
#include <allegro5/allegro.h>
//required by fmtime
#include <sys/types.h>
#include <sys/stat.h>
@LukeMS
LukeMS / blackjack.c
Created June 26, 2017 23:12
blackjack.c - learning exercise
/* A simple blackjack game in C */
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define NUM_SUITS 4
#define NUM_RANKS 13
#define HEARTS 3
@LukeMS
LukeMS / beholder_stopPropagation_example.lua
Created January 29, 2017 13:29
Example for an added feature on beholder.lua (event can be stopped from propagating further on)
beholder = require("beholder")
print("stopObserving: callback is permanently removed")
function observer1()
local id
id = beholder.observe(
'PLAYERDETECTION',
function(x, y)
print("observer1: player1 detected at", x, y)
if x >= 5 then
@LukeMS
LukeMS / priority_queue.lua
Last active January 2, 2024 09:04
Priority Queue implemented in lua, based on a binary heap.
--[[ Priority Queue implemented in lua, based on a binary heap.
Copyright (C) 2017 Lucas de Morais Siqueira <lucas.morais.siqueira@gmail.com>
License: zlib
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
@LukeMS
LukeMS / msys2-run.bat
Created January 5, 2017 18:13
Run msys32 bash commands directly from windows (cmd, run, etc.)
:: Pass as a string whatever command you want msys32's bash to run
:: e.g. msys2-run "cd folder_at_msys2_home && ./script_at_folder"
C:\msys32\usr\bin\bash -l -c %1