Skip to content

Instantly share code, notes, and snippets.

View voldern's full-sized avatar

Espen Volden voldern

  • Espen Volden
  • Norway
View GitHub Profile
# 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 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
require 'rubygems'
require 'sinatra'
get '/' do
haml :index
end
post '/' do
@error = true
@name = params[:file][:filename]
#### 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 }"
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}"
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
<?php
/**
* Used to autoload aether classes
*
* @access public
* @return bool
*/
public static function autoLoad($class) {
if (class_exists($class, false))
return true;
OBJS_STUDIO=\
Sequencer.o\
FramebufferBrowser.o\
GUILoader.o\
StudioGfx.o\
ProbeBrowser.o\
Tracker.o\
GUISaver.o\
Sync.o\
GUI/InputDialog.o\
Xli::Stream *shaderFile = fs->OpenFile("shader.cg", Xli::FileMode::FileModeRead);
Frontend4::DX10Program* prg = Frontend4::DX10Program::Load(device, shaderFile);
struct PSOutput
{
float4 Color: COLOR;
};
PSOutput psMain(void)
{
PSOutput Output;
Output.Color = float4(1, 0, 0, 0);
return Output;