Skip to content

Instantly share code, notes, and snippets.

View canxerian's full-sized avatar

Mark Nguyen canxerian

View GitHub Profile
@canxerian
canxerian / FlyCamera.cs
Last active January 3, 2023 14:52 — forked from FreyaHolmer/FlyCamera.cs
A camera controller for easily flying around a scene in Unity smoothly. WASD for lateral movement, Space & Ctrl for vertical movement, Shift to move faster. Add this script to an existing camera, or an empty game object, hit play, and you're ready to go~
// https://gist.github.com/FreyaHolmer/650ecd551562352120445513efa1d952
using UnityEngine;
[RequireComponent(typeof(Camera))]
public class FlyCamera : MonoBehaviour
{
public float acceleration = 50; // how fast you accelerate
public float accSprintMultiplier = 4; // how much faster you go when "sprinting"
public float lookSensitivity = 1; // mouse look sensitivity
@canxerian
canxerian / app.js
Created November 21, 2011 01:08 — forked from alessioalex/app.js
From Pedro Teixeira's http://nodetuts.com/tutorials/12-file-uploads-using-nodejs-and-express.html but with connect-form instead of multipart-js
var express = require('express'),
form = require('connect-form'),
fs = require('fs'),
util = require('util');
var app = express.createServer(
form({keepExtensions: true})
);
// switch between development and production like this: