Skip to content

Instantly share code, notes, and snippets.

@imliam
imliam / tfm-cookieclicker.lua
Last active September 29, 2022 06:37
Cookie Clicker game remade in Lua as a Transformice module
--http://cookieclicker.wikia.com/wiki/Upgrades
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tick=0
timePassed=0
players={}
map=[[<C><P L="1600" /><Z><S><S L="1600" H="48" X="800" Y="380" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="345" X="400" /></D><O /><L /></Z></C>]]
img={
cookie={"168537abe8d",250,250},
/*
|--------------------------------------------------------------------------
| Spacing
|--------------------------------------------------------------------------
|
| Utilities for controlling an element's padding and margin.
|
*/
$spacing-class: (
/**
* Register a new wildcard route that returns a view if it exists.
*
* @param string $path
* @param string $viewDirectory
* @param array $data
* @return \Illuminate\Routing\Route
*/
\Route::macro('viewDir', function ($path, $viewDirectory = null, $data = []) {
$pathWithSegments = trim($path, '/') . '/{page?}';

You can register the mixin class in the register method of a Laravel service provider:

use Illuminate\Foundation\Testing\TestResponse;

TestResponse::mixin(TestResponseMixin::class);
<?php
/**
* Escape HTML tags in a string, except for the allowed tags.
*/
function escape_html_tags(string $string, array $allowedTags = []): string
{
$allowedTags = array_map('strtolower', $allowedTags);
return preg_replace_callback(