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 file is specifically setup for use with the merb-auth plugin. | |
# This file should be used to setup and configure your authentication stack. | |
# It is not required and may safely be deleted. | |
# | |
# To change the parameter names for the password or login field you may set either of these two options | |
# | |
# Merb::Plugins.config[:"merb-auth"][:login_param] = :email | |
# Merb::Plugins.config[:"merb-auth"][:password_param] = :my_password_field_name | |
begin |
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 file is part of FirstTry. | |
# | |
# FirstTry is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# FirstTry is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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 'rubygems' | |
require 'sinatra' | |
get '/' do | |
haml :index | |
end | |
post '/' do | |
@error = true | |
@name = params[:file][:filename] |
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
#### VARIABLES #### | |
# network | |
localnet = "10.0.0.0/24" | |
externip = "**.***.***.**" | |
if = "le0" | |
# services | |
tcp_in = "{ ssh, www }" | |
tcp_out = "{ ssh, www, auth, ftp, ftp-data }" | |
udp_s = "{ domain, ntp }" |
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
module TraceCalls | |
def self.included(klass) | |
def klass.method_added(method) | |
return if @_meta_yo | |
@_meta_yo = true | |
alias_method :"#{method} old", method | |
define_method(method) do |*args| | |
puts "--> Calling #{method} with #{args.inspect}" | |
out = send(:"#{method} old", *args) | |
puts "<-- Returned #{out.inspect}" |
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 'ftools' | |
class Appartment | |
include DataMapper::Resource | |
attr_accessor :app_images | |
property :id, Serial | |
property :name, String, :nullable => false, :unique => true | |
property :bedrooms, Integer, :nullable => false | |
property :bathrooms, Integer, :nullable => false |
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
<?php | |
/** | |
* Used to autoload aether classes | |
* | |
* @access public | |
* @return bool | |
*/ | |
public static function autoLoad($class) { | |
if (class_exists($class, false)) | |
return true; |
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
OBJS_STUDIO=\ | |
Sequencer.o\ | |
FramebufferBrowser.o\ | |
GUILoader.o\ | |
StudioGfx.o\ | |
ProbeBrowser.o\ | |
Tracker.o\ | |
GUISaver.o\ | |
Sync.o\ | |
GUI/InputDialog.o\ |
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
Xli::Stream *shaderFile = fs->OpenFile("shader.cg", Xli::FileMode::FileModeRead); | |
Frontend4::DX10Program* prg = Frontend4::DX10Program::Load(device, shaderFile); |
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 PSOutput | |
{ | |
float4 Color: COLOR; | |
}; | |
PSOutput psMain(void) | |
{ | |
PSOutput Output; | |
Output.Color = float4(1, 0, 0, 0); | |
return Output; |
OlderNewer