just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo.
| /* Fonte: https://gist.github.com/lucaspar/2c20754b37920217678cebb64170cb7a */ | |
| /** | |
| * Calcula o imposto de renda sobre o valor de rendimentos tributáveis, | |
| * conforme tabela progressiva do ano tributário de 2023, seguindo a | |
| * incidência mensal do imposto sobre a renda de pessoas físicas (IRPF). | |
| * | |
| * @params {Number} rendimentos Renda a ser tributada, em R$. | |
| * @returns {Number} imposto a pagar sobre `rendimentos`, em R$. | |
| **/ |
| import React from "react" | |
| import { render } from "react-dom" | |
| import { createContextState, useContextState, Provider } from "unstated" | |
| let Count = createContextState(0) | |
| function useCounter() { | |
| let [count, setCount] = useContextState(Count) | |
| let increment = () => setCount(count + 1) | |
| let decrement = () => setCount(count - 1) |
| let mix = require('laravel-mix'); | |
| mix.js('src/index.js', 'dist/foo.js').sourceMaps(); | |
| mix.webpackConfig({ | |
| output: { | |
| libraryTarget: 'umd', | |
| } | |
| }) |
| <?php | |
| function tinker(...$args) { | |
| // Because there is no way of knowing what variable names | |
| // the caller of this function used with the php run-time, | |
| // we have to get clever. My solution is to peek at the | |
| // stack trace, open up the file that called "tinker()" | |
| // and parse out any variable names, so I can load | |
| // them in the tinker shell and preserve their names. |
| <?php | |
| require __DIR__ . '/kirby/bootstrap.php'; | |
| $kirby = new Kirby([ | |
| 'roots' => [ | |
| 'static' => __DIR__ . '/static' | |
| ], | |
| 'urls' => [ | |
| 'index' => '/' |
just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo.
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Routing\Route; | |
| use Illuminate\Support\ServiceProvider; | |
| use App\Http\Middleware\CaptureRequestExtension; | |
| class AppServiceProvider extends ServiceProvider |
| let cssImport = require('postcss-import') | |
| let cssNext = require('postcss-cssnext') | |
| let glob = require('glob-all') | |
| let mix = require('laravel-mix') | |
| let purgeCss = require('purgecss-webpack-plugin') | |
| let tailwind = require('tailwindcss') | |
| mix.js('resources/assets/js/app.js', 'public/js') | |
| .postCss('resources/assets/css/app.css', 'public/css/app.css', [ | |
| cssImport(), |
| let mix = require("laravel-mix"); | |
| let tailwindcss = require("tailwindcss"); | |
| let glob = require("glob-all"); | |
| let PurgecssPlugin = require("purgecss-webpack-plugin"); | |
| /** | |
| * Custom PurgeCSS Extractor | |
| * https://github.com/FullHuman/purgecss | |
| * https://github.com/FullHuman/purgecss-webpack-plugin | |
| */ |
| {% for video in site.static_files %} | |
| {% if video.path contains 'img/videos' %} | |
| <video muted playsinline> | |
| <source src="{{ site.baseurl }}{{ video.path }}" type="video/mp4"> | |
| </video> | |
| {% endif %} | |
| {% endfor %} |