Skip to content

Instantly share code, notes, and snippets.

View branan's full-sized avatar
💩

Branan Riley branan

💩
View GitHub Profile
#! /usr/bin/env ruby
require 'yaml'
# Pull our version information out of the environment
PE_VERSION=ENV['pe_version']
PE_FAMILY=ENV['pe_family']
# If our version is the same as our family, we're installing a
# released version. Use the archive path. Otherwise, we want to use

Keybase proof

I hereby claim:

  • I am branan on github.
  • I am branan (https://keybase.io/branan) on keybase.
  • I have a public key whose fingerprint is 17B3 779B 9F2A 9584 71B7 4D92 EFFA AC21 382C D5CA

To claim this, I am signing this object:

require 'uri'
module Puppet
newtype(:uri_provider) do
@doc = "A type which determines its provider based on the scheme of a URI passed as a parameter"
ensurable
newparam(:name) do
end
@branan
branan / shard_todo.txt
Created April 14, 2011 05:20
Things To Do for the GoW Shard
Technical:
* Get KI chat working in DirtSand
* Cleanup Bevin
* Adjust Startup python to link to the cleft
* Generate a new UUID for our builds
* Reset the build ID to match the new UUID
Artistic:
* Adjust cleft to be the starting point again
@branan
branan / tables.sql
Created April 18, 2011 04:27
create table script
CREATE TABLE ages (
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
agename VARCHAR(16) NOT NULL,
author MEDIUMINT(8) UNSIGNED NOT NULL,
longname VARCHAR(255) NOT NULL,
version INTEGER UNSIGNED NOT NULL,
release DATE NOT NULL,
updated DATE NOT NULL,
seqprefix INTEGER UNSIGNED NULL,
PRIMARY KEY(ID)
/////////////////////////////////////////////////////////////////////////////
//
// Function : SendKIMessageIReply
// PARAMETERS : command - the command type
// : value - extra value as an Int32
//
// PURPOSE : Send message to the KI, to tell it things to do
//
// RETURNS : nothing
//
@branan
branan / gist:958242
Created May 6, 2011 00:28
Make age private in dirtsand
uint32_t dm_auth_set_private(uint32_t nodeid) {
PostgresStrings<4> parms;
parms.set(0, nodeid);
parms.set(1, DS::Vault::e_NodeAgeInfo);
PGresult* result = PQexecParams(s_postgres,
"SELECT \"Uuid_1\" FROM vault.\"Nodes\" WHERE idx=$1 AND \"NodeType\"=$2",
2, 0, parms.m_values, 0, 0, 0);
if (PQresultStatus(result) != PGRES_TUPLES_OK) {
fprintf(stderr, "%s:%d:\n Postgres SELECT error: %s\n",
__FILE__, __LINE__, PQerrorMessage(s_postgres));
@branan
branan / gist:958245
Created May 6, 2011 00:29
Make age private in dirtsand
uint32_t dm_auth_set_private(uint32_t nodeid) {
PostgresStrings<4> parms;
parms.set(0, nodeid);
parms.set(1, DS::Vault::e_NodeAgeInfo);
PGresult* result = PQexecParams(s_postgres,
"SELECT \"Uuid_1\" FROM vault.\"Nodes\" WHERE idx=$1 AND \"NodeType\"=$2",
2, 0, parms.m_values, 0, 0, 0);
if (PQresultStatus(result) != PGRES_TUPLES_OK) {
fprintf(stderr, "%s:%d:\n Postgres SELECT error: %s\n",
__FILE__, __LINE__, PQerrorMessage(s_postgres));
@branan
branan / gist:1003173
Created June 1, 2011 20:04
Response to JWPlatt 01/06/2011
[quote="JWPlatt"]If we are not responsive, it is not because we are disinterested or shunning you. It is because there are matters of livelihood and family more important than Uru.[/quote] I'm going to address this first, because I think it's extremely important. I feel quite strongly that if the people in your team didn't have the time and energy to deal with code maintainership and developer interaction, then you needed to either look for help [b]before[/b] the release so you could have a proper maintainer, or tell Cyan "Thanks, but I don't think we can handle this right now" so that another team in the community who [b]does[/b] have the time and energy could handle it.
[quote="JWPlatt"]Community participation is critical to the sustained success of this long term project. There is an imperative that people should be called upon to get involved and participate. This is not our project. It is yours; everyone's. It can only work with more people getting involved, being committed, and taking positions of re
@branan
branan / gist:1008289
Created June 4, 2011 20:00
GL error handling
static const char* glErrorString(GLenum err) {
switch(err) {
case GL_INVALID_ENUM: return "Invalid Enum";
case GL_INVALID_VALUE: return "Invalid Value";
case GL_INVALID_OPERATION: return "Invalid Operation";
case GL_STACK_OVERFLOW: return "Stack Overflow";
case GL_STACK_UNDERFLOW: return "Stack Underflow";
case GL_OUT_OF_MEMORY: return "Out of Memory";
case GL_TABLE_TOO_LARGE: return "Table too Large";
default: return "Unknown Error";