Skip to content

Instantly share code, notes, and snippets.

// CSS Reset
@import "reset.less";
// Core variables and mixins
@import "variables.less";
@import "mixins.less";
// Grid system and page structure
@import "scaffolding.less";
using System;
using Nuvis;
public class MyNewWorker : WorkerBase
{
public override void Execute()
{
// you can use softStop to see if a
// stop command was passed to the worker
// signaling that it needs to shutdown
using System;
using Nuvis;
using Nuvis.Mongo;
public class Program
{
public static void Main(string[] args)
{
MyWorker worker = new MyWorker(new MongoWorkerRepository(),
new MongoWorkerCommandRepository());
@mattkruskamp
mattkruskamp / RequiredIfAttribute.cs
Created January 1, 2012 12:20
Asp.Net JQuery Unobtrusive Conditional Validation
public class RequiredIfAttribute : ValidationAttribute, IClientValidatable
{
private RequiredAttribute _innerAttribute = new RequiredAttribute();
public string DependentProperty { get; set; }
public object TargetValue { get; set; }
public RequiredIfAttribute(string dependentProperty, object targetValue)
{
this.DependentProperty = dependentProperty;
@mattkruskamp
mattkruskamp / web.config
Created December 18, 2011 03:13
Not Serving woff files
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
<staticContent>
<mimeMap fileExtension=".woff"
mimeType="application/x-font-woff" />
</staticContent>
</system.webServer>
[UnrealEd.EditorEngine]
+EditPackages=UTGame
+EditPackages=UTGameContent
+EditPackages=VicGame
[Engine.GameInfo]
DefaultGame=VicGame.VicGame
DefaultServerGame=VicGame.VicGame
PlayerControllerClassName=VicGame.VicPlayerController
GameDifficulty=+1.0
MaxPlayers=32
DefaultGameType="VicGame.VicGame"
class VicPlayerCamera extends Camera;
var Vector CamOffset;
var float CameraZOffset;
var float CameraScale, CurrentCameraScale; /** multiplier to default camera distance */
var float CameraScaleMin, CameraScaleMax;
function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
{
local vector HitLocation, HitNormal;
class VicPlayerController extends GamePlayerController;
defaultproperties
{
CameraClass=class'VicGame.VicPlayerCamera'
}
class VicPawn extends Pawn;
var DynamicLightEnvironmentComponent LightEnvironment;
defaultproperties
{
WalkingPct=+0.4
CrouchedPct=+0.4
BaseEyeHeight=38.0
EyeHeight=38.0