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
class Transform | |
{ | |
public: | |
calcMatrix(); // builds a matrix from m_T and m_R | |
setFromMatrix(const Matrix& mat); // sets m_T and m_R | |
getRotation(); | |
setRotation(const Quat& r); | |
getTranslation(); |
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
require 'mechanize' | |
require 'logger' | |
require 'date' | |
## Call: | |
## $ ruby export.rb <gmail> <password> | |
caFile = File.join(File.dirname(__FILE__), 'cacert.pem') | |
if not File.exists? caFile | |
require 'net/http' |
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
-- I haven't tested these, they probably don't work | |
local object = { | |
type = function(self) return getmetatable(self).__index end, | |
} | |
local hash = { | |
data = function(self) return getmetatable(self).data end, | |
set = function(self, key, value) rawset(self.data, key, value) end, |
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
do | |
local lua = {} | |
local core = setmetatable({}, { __index = lua, }) | |
_G = setmetatable(_G, { __index = core }) | |
for k,v in pairs(_G) do | |
if k ~= "_G" then | |
lua[k] = v |
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
#!/bin/bash | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi |
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
[alias] | |
tracked = "!f(){ git rev-parse --symbolic-full-name --abbrev-ref $1@{u}; }; f" | |
fresh-checkout = "!f(){ B=$1; T=$(git tracked $B) R=$(git rev-parse $B); git branch -D $B && git checkout -b $B $T && git cherry-pick $T..$R; }; f" |