This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void DrawMesh(Gob_Mesh *mesh) { | |
glVertexPointer(3, GL_FLOAT, mesh->positions.stride, GOB_BUFFER(mesh->positions.buffer)->data + mesh->positions.start); | |
char *index_buffer = GOB_BUFFER(mesh->indices.buffer)->data; | |
uint8_t index_size = mesh->indices.index_size; | |
GLenum index_type = (index_size == 2) ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT; | |
for (size_t i = 0; i < mesh->sections_count; i++) { | |
glDrawElements(GL_TRIANGLES, mesh->sections[i].index_count, index_type, index_buffer + index_size * mesh->sections[i].index_start); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum { BMAX = 32, BCUT = BMAX / 2, BHEIGHT = 6 }; | |
typedef uint8_t BIndex; | |
struct BNode { | |
BIndex length; | |
Key keys[BMAX]; | |
union { | |
BNode *children[BMAX]; | |
Value values[BMAX]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct A { | |
int size; | |
int capacity; | |
T *data; | |
}; | |
typedef struct A A; | |
void A_(Create)(A *array, int capacity); | |
void A_(Destroy)(A *array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to a proprer repositoy, TSWS is a real boy now! | |
https://github.com/dfletcher/tsws | |
PRs welcomed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Synchronizes ZFS filesystems. | |
# | |
# Takes three args: source pool, destination pool, and filesystem name. | |
# | |
# Syncs most recent snapshot of filesystem from source to destination pool, | |
# using incremental transfer if possible. | |
# Take a snapshot line from zfs list -t snapshot and emit a struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is an rsync-excludes format list of files to exclude. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem This batch file is executed by vscsc.exe after the shadow copy has been | |
rem created. It is used to initate the backup. | |
rem | |
rem %1 is the volume ID of the backup, we pass it to the bash script which | |
rem runs rsync for us. | |
c:\cygwin64\bin\bash.exe --login -i ./do-remote-backup.bsh "%1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if _%1_==__ goto USAGE | |
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/CN=My Cert Name" | |
openssl pkcs12 -export -out mycert.pfx -inkey mycert.pem -in mycert.pem -passout pass:%1 | |
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer | |
openssl pkcs12 -in mycert.pfx -nodes -passin pass:%1 | openssl x509 -noout -fingerprint | |
openssl x509 -in mycert.pem -noout -fingerprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This playbook has been removed as it is now very outdated. |
NewerOlder