Skip to content

Instantly share code, notes, and snippets.

View donalmacc's full-sized avatar

Donal Mac Carthy donalmacc

  • @AnchorPoint_Inc
  • Edinburgh, Scotland
View GitHub Profile
@donalmacc
donalmacc / premake4.lua
Created March 17, 2014 02:52
Simple Premake4 script that gets my SDL2 and glew libraries and creates a project.
-- Simple Premake script to get all C/C++ files
solution "SolutionName"
configurations { "Debug", "Release" }
project "ProjectName"
kind "ConsoleApp"
language "C++"
files { "**.h", "**.cpp"}
links{ "SDL2", "glew32", "glew32s"}
@donalmacc
donalmacc / premake4.lua
Created April 10, 2014 14:24
Premake4 script to generate a solution for Lua 5.2.3 from the source found on 10/04/2014.
solution "Lua"
configurations { "Release", "Debug"}
os.chdir("src")
-- The static Lua library
project "Lua51"
bindir = "bin"
libdir = "lib"
kind "StaticLib"
@donalmacc
donalmacc / hello.cpp
Created May 21, 2014 14:58
invsqrt vs fastinvsqrt
#include "glm.h"
#include<vector>
#include <iostream>
#include<Windows.h>
double PCFreq = 0.0;
__int64 CounterStart = 0;
void StartCounter()
{
LARGE_INTEGER li;
@donalmacc
donalmacc / server.py
Last active August 29, 2015 14:04
simple printing server
from socket import *
host = "localhost"
port = 50000
buf = 1024
addr = (host,port)
# Create socket and bind to address
UDPSock = socket(AF_INET,SOCK_DGRAM)
UDPSock.bind(addr)
print "Listening"
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.0"
}
}
}
# Set the variable value in *.tfvars file