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
require "net/http" | |
# Veeery simple recaptcha client. | |
# In your controller or filter | |
# @recaptcha = Recaptcha.new(:pubkey => your_public_key, :privkey => your_private_key) | |
# In the view | |
# <%= @recaptcha.form %> | |
# In the accepting action, rescue from Recaptcha::Failed | |
# begin | |
# @recaptcha.verify!(:env => env, :params => params) |
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
# An XML writer for Ruby's XML RPC module | |
require 'rubygems' | |
require 'builder' | |
# The default XML serializer in Ruby's XML RPC module is VERY sloppy. | |
# We use Jim Weirich's excellent Builder to generate clean XML, even though it costs us some extra | |
# performance | |
class RPCBuilder | |
# This is what is going to be lugged around as XML RPC results. It's actually |
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
def create | |
@obj = SomeClass.create(params[:shmoo]) | |
execute_callbacks :on => :shmoo_creation, :with => @obj | |
redirect_to somewhere | |
end | |
def execute_callbacks(options) | |
@callbacks ||= {} |
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
GetGlobalPos(obj) // Get the global transform matrix for an object independently of the parenting | |
{ | |
var globalMatrix = obj->GetMg(); | |
return globalMatrix->GetV0(); | |
} | |
main(doc,op) | |
{ | |
var radius = 50; |
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 "grid.h" | |
#include <OpenGL/gl.h> | |
#include <OpenGL/glu.h> | |
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
double pixX; | |
double pixY; |
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
//SIZZLET Rename and Renumber Selected Trackers | |
// Renames or prefixes selected tracker names | |
dlg = NewDialog("pfxTrackersDLG") | |
dlg.Radio("doPrefix", "Prefix existing names", 1) | |
dlg.Radio("doSuffix", "Suffix existing names", 0) | |
dlg.Radio("doRename", "Rename and renumber in selection", 0) | |
dlg.String("renameString", "Name prefix", "Xtra") |
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
set cut_paste_input [stack 0] | |
version 6.0 v7 | |
Ramp { | |
inputs 0 | |
p0 {0 0} | |
p1 {0 1556} | |
color {0 1 0 0} | |
name Ramp1 | |
selected true | |
xpos 181 |
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
RotoPaint { | |
toolbar_brush_hardness 0.200000003 | |
toolbar_lifetime_type all | |
toolbar_source_transform_scale {1 1} | |
toolbar_source_transform_center {1024 778} | |
output alpha | |
premultiply rgb | |
curves {AnimTree: "" { | |
Version: 1.2 | |
Flag: 0 |
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
# We send this as a response object. Rack can use any object that responds to each() as | |
# response body. When each() is called, the object | |
# will activate the FTP connection and couple the FTP receive loop with the HTTP send loop. | |
# This will probably go totally kaput on shitservers like Webrick that still insist on buffering | |
# any output, but someone who uses Webrick can better shoot himself on the spot. Since | |
# we provide range support, we need to pass it downstream to the FTP server and we need to send | |
# exactly the amount of bytes requested to satisfy range. | |
class Fatpete::FTPStream | |
CHUNK_SIZE = 128 * 1024 | |
SLEEP_BETWEEN_CHUNKS = 0.1 |
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
set cut_paste_input [stack 0] | |
version 6.0 v7 | |
push $cut_paste_input | |
Group { | |
name GrowFront | |
selected true | |
xpos -465 | |
ypos -223 | |
addUserKnob {20 growfront l GrowFront} | |
addUserKnob {41 grow T GrowBlur.size} |