Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Drive\Model\Page;
class FormHelper{
/**
*
* @var type \Drive\Model\Page
*/
/* generator
*
* takes a chance value, C, an array of objects, and returns a Generator
* function that computes a random value, R. if R < C the Generator returns
* nothing, else the Generator returns a random item from the array of
* objects.
*
* params:
* chance: floating point value between [0,1].
* objs: array of objects to select from.
// base tile class
var Tile = Base.extend({
// the map level object this tile is attached to
mapLevel: null,
x: null,
y: null,
miniMapColor: "#0e541e",
// if passable != true, then actors cannot walk on the tile ("fish" and "birds" handled separately)
var HpPotion = function(settings){
settings = settings || {};
_.extend(this, settings);
};
HpPotion.prototype = {
constructor: HpPotion,
slug: 'hp_potion',
var config = {
top: {
// repeat or scale (x only)
transform: 'repeat',
data:[
'01',
'01',
]
},
var metalSmith = require('metalsmith');
var myPlugin = function(files, metalsmith, done){
/*
files param looks like this
{
'path/to/file.html': {
// yaml front matter data from md file here (foo and whatever)
foo: 'bar',
<?php namespace Herbert\Framework;
/**
* Class Plugin
* @package Herbert\Framework
* @function Message $message
* @function Controller $controller
* @function General $general
* @function Response $response
* @function View $view
<?php
use Illuminate\Support\Debug\HtmlDumper;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Component\VarDumper\Cloner\VarCloner;
if(!function_exists('d')) {
/**
* Dump the passed variables in place on page. Primarily for views.
* @param mixed
# Exported from Wings 3D 1.5.3
mtllib test.mtl
o Cube1
#8 vertices, 6 faces
v -1.00000000 -1.00000000 -1.00000000
v -1.00000000 -1.00000000 1.00000000
v -1.00000000 1.00000000 -1.00000000
v -1.00000000 1.00000000 1.00000000
v 1.00000000 -1.00000000 -1.00000000
v 1.00000000 -1.00000000 1.00000000
# Exported from Wings 3D 1.5.3
mtllib truck.mtl
o STL object_sep2
#1042 vertices, 2156 faces
v 0.11671169 1.67528256 10.36706645
v 0.11671169 2.27753256 10.36706645
v 0.11671169 1.31393256 10.00571645
v 0.11671169 1.55483256 10.00571645
v 0.11671169 1.19348256 9.93874628
v 0.11671169 1.19348256 9.52391645