Skip to content

Instantly share code, notes, and snippets.

View billyquith's full-sized avatar
🏠
Working from home

Bill Quith billyquith

🏠
Working from home
View GitHub Profile
@billyquith
billyquith / brews.sh
Last active December 8, 2015 18:11
OSX setup
#!/bin/bash
brew install boost
brew install cmake premake
brew install doxygen
brew install lua luajit
brew install flatbuffers
brew install rapidjson
brew install sdl2 --HEAD
@billyquith
billyquith / al5_apple_build.sh
Created December 30, 2015 20:01
Build script for Allegro 5
#! /bin/bash
#
# Purpose: Build Allegro 5 for OSX and iOS.
#
# WARNING!
# Make sure you have the most recent version of the build tools. Apple moved
# installation of Xcode 4.3 from /Developer to /Applications. cmake has been
# being patched ever since. This script was tested with:
# * Xcode 4.5.2 and Macports cmake 2.8.10. *
# You will have problems with cmake 2.8.9 and other versions of cmake.
@billyquith
billyquith / lua_db_macros.h
Last active May 23, 2016 08:30
Useful Lua C API debug macros
// Put at start of function
#define LUDB_DECL int db_top(0),zz_ltop=lua_gettop(L),db_d_top(0),db_typei(-1),db_idx(0); \
const char *db_type(0), *db_valstr(0);
// Put after each line Lua API was used
#define LUDB(I) db_top=lua_gettop(L); db_d_top=db_top-zz_ltop; zz_ltop=db_top; \
db_typei=lua_type(L,I); db_type=lua_typename(L,db_typei); \
db_valstr=lua_tostring(L,I); db_idx= I>=0 ? I : db_top+I+1
@billyquith
billyquith / FindDirectX9.cmake
Created October 15, 2017 21:53
Cmake Find DirectX config
# Find DirectX9
message("Looking for DirectX9...")
file(GLOB DX9_SEARCH_PATHS
"$ENV{DXSDK_DIR}/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK*/Include"
"$ENV{PROGRAMFILES}/Microsoft SDKs/Windows/*/Include"
"C:/Program Files (x86)/Windows Kits/*/include/um"
"C:/Program Files/Windows Kits/*/include/um"
@billyquith
billyquith / html5.html
Last active October 23, 2020 09:50
HTML5 template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TITLE</title>
<style>
</style>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
# /* vim: set ai ts=4 ft=sh: */
#
# Copyright 2011, The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#