Skip to content

Instantly share code, notes, and snippets.

View awstanley's full-sized avatar

A.W. Stanley awstanley

  • Sydney, Australia
View GitHub Profile
@awstanley
awstanley / blink1.cpp
Created June 13, 2014 06:32
Clean room hidapi based blink1 miniature library implementation. I didn't even realise hidapi was used in the official tool until someone mentioned it; my general disdain for dealing with the compile issues usually boiled down to dynamic library imports (dlopen, etc.) instead of trying to fix it.
/*
Copyright (c) 2014, A.W. Stanley
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
/*
* Copyright (c) 2006-2014 A.W. Stanley
* Released into the public domain as of
* http://awsta.nley.org/post/88514503005/c-steamid-conversion
*
* An assumption is made about "normal" string inputs.
* Note: 76561197960265728 = 0000 0001 0001 0000 0000 0000 0000 0001
* Universe: (0000 0001)
* Account Type: (0001)
* Instance: (0000 0000 0000 0001)
--[[-------------------------------------------------------------------
-- Platform detecting Lua initialisation code
-- Copyright (c) 2014 A.W. Stanley <aws@sysfunc.net>
-- Released under the new BSD License
-------------------------------------------------------------------]]--
local lua_dir = "lua"
local lua_init = "lua/server.lua"
-- Pull the first directory