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
# Rake Quick Reference | |
# by Greg Houston | |
# http://ghouston.blogspot.com/2008/07/rake-quick-reference.html | |
# ----------------------------------------------------------------------------- | |
# Running Rake | |
# ----------------------------------------------------------------------------- | |
# running rake from the command-line: | |
# rake --help |
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
# Rake task to copy local files to remote server via FTP | |
# required credentials.yml file, that contains keys: | |
# server, username, password | |
require "net/ftp" | |
require "yaml" | |
class FTPClient | |
attr_reader :remote_path |
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
#include "Base.h" | |
Base::Base() : | |
IsRegistered_(false) | |
{ } | |
Base::Base(bool isRegistered) : | |
IsRegistered_(isRegistered) | |
{ } |
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
/* | |
Twisting Pool Allocator | |
======================= | |
written by Leonard Ritter ([email protected]) | |
This file is in the public domain | |
I don't know if I was the first one to stumble upon this technique, so | |
I can't guarantee there's no patent on it, but let's hope there's not, |
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
--math | |
local function length(x, y, z) return sqrt(x*x + y*y + z*z) end | |
local function norm(x, y, z) local l = length(x,y,z) return x/l, y/l, z/l end | |
local function dot(xa, ya, za, xb, yb, zb) return xa*xb + ya*yb + za*zb end | |
--globals | |
local ex, ey, ez = 0, 1, -1.5 --camera position | |
local fov = 90 --camera FOV | |
local tmin, tmax = .1, 100 --minimum and maximum distance from camera | |
local maxSteps = 45 --maximum number of steps to take |