This file contains hidden or 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
GLenum err = glGetError(); | |
while (err != GL_NO_ERROR) { | |
fprintf(stdout, "glError: %s caught at %s:%u\n", (char *)gluErrorString(err), __FILE__, __LINE__); | |
err = glGetError(); | |
} |
This file contains hidden or 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
int ipow(int base, int exp) | |
{ | |
int r = 1; | |
while (exp) { | |
if (exp & 1) | |
r *= base; |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Fernando L. Garcia Bermudez</string> | |
<key>name</key> | |
<string>Desert Night</string> | |
<key>settings</key> | |
<array> |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdint.h> | |
int main() { | |
//set initial vars, range of 0 - 3 | |
int p1 = 1; | |
int p2 = 2; | |
int p3 = 0; | |
int p4 = 3; |
This file contains hidden or 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
/********************** | |
mini-astar | |
a very minimal A* pathfinding implementation | |
Map Key | |
0 = normal tile | |
1 = impassable tile | |
5 = start | |
9 = goal |
This file contains hidden or 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
//modified from http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 | |
//input of 1 returns 1 | |
function nextLowestPow2(d) { | |
d|=d>>1; | |
d|=d>>2; | |
d|=d>>4; | |
d|=d>>8; | |
d|=d>>16; | |
return (d + 1) / 2; |
This file contains hidden or 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
*Add the toolchain/test PPA* | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install g++-4.8 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 | |
*If you ever want to update symlinks for a future version:* | |
sudo rm /usr/bin/g++ | |
sudo ln -s /usr/bin/g++-4.XXX /usr/bin/g++ |
This file contains hidden or 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
function log2(val) { | |
return Math.log(val) / Math.LN2; | |
} | |
//find the number of flags a musical note gets | |
alert(log2(8) - 2); //8th notes get 1 flag | |
alert(log2(128) - 2); //128th notes get 5 flags |
This file contains hidden or 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
f'8^ \markup { \fontsize #-1 \override #'(font-name . "Century Schoolbook bold") "II" } |
This file contains hidden or 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
\once\override Hairpin #'minimum-length = #7 |