Skip to content

Instantly share code, notes, and snippets.

@luciditee
luciditee / BatchBurner.cs
Last active June 16, 2018 17:09
Batch Burner, a script designed to reduce static mesh draw calls in Unity scenes with a large number of static mesh entities.
/*
* Unity Batch Burner: A script designed to reduce static mesh draw calls automatically in scenes
* with a large amount of static geometry entities.
*
* Copyright 2016-2017 Will Preston & Die-Cast Magic Studios, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
//parts of this were inspired by https://github.com/prime31/UIToolkit/blob/master/Assets/Plugins/UIToolkit/UIElements/UIText.cs
public class FDFontLabel : FLabel
{
protected int dynamicFontSize = 32;
protected FontStyle dynamicFontStyle = FontStyle.Normal;

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be
--[[
Paste in main.lua then call the function with these parameters.
If anything doesn't make sense or there is code that could be shortened please comment!
And I will be adding sound and making it so everything can just not be used by putting nil.
-----FEATURES----
-Scaling when pressed
-Scaling size and time are editable
-Different Image for when button is pressed
-Change scene when button is pressed
@Deco
Deco / coroutine_scheduler.lua
Created February 13, 2012 16:38
Lua Coroutine Scheduler
pcall(require,"socket")
local coroutine_scheduler = {
_NAME = "coroutine_scheduler.lua"
_VERSION = "1.0.0",
}
local Scheduler
do Scheduler = setmetatable({}, {
__call = function(class)
@bnoguchi
bnoguchi / enum-access.js
Created May 3, 2011 09:19
How to access enumValues in mongoose from a Model or Document
var mongoose = require('./index')
, TempSchema = new mongoose.Schema({
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']}
});
var Temp = mongoose.model('Temp', TempSchema);
console.log(Temp.schema.path('salutation').enumValues);
var temp = new Temp();
console.log(temp.schema.path('salutation').enumValues);