Topics coming in the next edition:
- ✅ Load balancers from scratch (published on 10th of October)
- ✅ Terraform (published on 12th of November)
- HELM
- Serving static content
- CGI, FastCGI, php-fpm
// Use like this: node --import logger.js yourapp.js | |
import path from 'path'; | |
const { log } = console; | |
[`debug`, `log`, `warn`, `error`, `table`, `dir`].forEach((methodName) => { | |
const originalLoggingMethod = console[methodName]; | |
console[methodName] = (...args) => { | |
const originalPrepareStackTrace = Error.prepareStackTrace; | |
Error.prepareStackTrace = (_, stack) => stack; |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Laravel\Scout\Builder; | |
class MacroServiceProvider extends ServiceProvider | |
{ | |
/** |
Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.
So now, there's a scribe for that :
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Alpine Ajax test</title> | |
</head> | |
<body> | |
<h1>Users API Retrieval Test</h1> |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Support\Facades\Vite; | |
use Illuminate\Support\Str; | |
/** | |
* Simple Content Security Policy middleware. |
<div :class="imageUrl && 'border-orange-500 dark:border-pink-500'" | |
class="flex justify-center items-center border-2 border-gray-300 dark:border-dark-line border-dashed rounded-md h-48 overflow-y-hidden" | |
x-data="fileUpload"> | |
<template x-if="!imageUrl"> | |
<div class="space-y-1 text-center px-6 pt-5 pb-6 w-full"> | |
<svg aria-hidden="true" class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" | |
viewBox="0 0 48 48"> | |
<path | |
d="M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02" | |
stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> |
// Usage | |
// <x-card-weather-forecast location="Guwahati" api-key="your-weatherapi.com-api-key" /> | |
@props([ | |
"location" => "Guwahati", | |
"apiKey" => "", | |
"poll" => 10000 | |
]) | |
<div class="bg-white shadow rounded-lg p-5 dark:bg-gray-800 max-w-full" |
<?php | |
namespace App\Http\Livewire; | |
use App\Models\Tag; | |
use App\Models\User; | |
use Illuminate\Database\Eloquent\Builder; | |
use Rappasoft\LaravelLivewireTables\DataTableComponent; | |
use Rappasoft\LaravelLivewireTables\Views\Columns\BooleanColumn; | |
use Rappasoft\LaravelLivewireTables\Views\Column; |
<script data-turbo-eval="false"> | |
document.addEventListener('turbo:before-render', () => { | |
let permanents = document.querySelectorAll('[data-turbo-permanent]') | |
let undos = Array.from(permanents).map(el => { | |
el._x_ignore = true | |
return () => { | |
delete el._x_ignore | |
} |