I’ve been using the Aula FL108 Pro keyboard, and overall it's a solid board. It supports three connectivity options:
- Wired (USB)
- 2.4GHz wireless
- Bluetooth
It also has four system modes: Windows, macOS, iOS, and Android.
| import { joinURL } from 'ufo' | |
| // Full relative path: server/api/[...].ts | |
| export default defineEventHandler((event) => { | |
| const config = useRuntimeConfig(event) | |
| const headers = new Headers() | |
| headers.set('cookie', getRequestHeader(event, 'cookie')!) |
By default, Laravel Telescope allows you to visit the /telescope route if:
localviewTelescope Gate checkBy tracing how Telescope does it Authorization, I've found:
There are scenarios where you have to act as a specific user such as during debugging and sometimes logging in as a user that is accessible via web ui like the admin dashboard is not a feature in the app.
This snippet allows you to generate a session cookie as a specific user that you can then inject to your browser.
| <template> | |
| <UsersRepo> | |
| <template v-slot="{ isLoading, fetch, users }"> | |
| <button | |
| v-if="users.length === 0" | |
| @click="fetch" | |
| > | |
| Fetch Users | |
| </button> |
| import { EventEmitter } from 'events'; | |
| export default function scopeEventEmitter(events: EventEmitter, scope: string): EventEmitter { | |
| return { | |
| eventNames: () => events.eventNames().filter((name) => typeof name === 'string' && name.endsWith(`:${scope}`)), | |
| on(event: string, listener) { | |
| events.on(`${event}:${scope}`, listener); | |
| return this; | |
| }, |
| interface Layouts { | |
| [name: string]: LayoutRoot; | |
| } | |
| const layouts: Promise<Layouts> = new Promise(resolve => { | |
| Promise.all([ | |
| Icon.getImageSource("people"), | |
| Icon.getImageSource("message") | |
| ]).then(icons => { | |
| resolve({ |
| <?php | |
| namespace App\Exceptions; | |
| class Handler | |
| { | |
| /** | |
| * Convert a validation exception into a JSON response. | |
| * | |
| * @param \Illuminate\Http\Request $request |
| <?php | |
| Validator::extend('day', function($attribute, $value, $parameters, $validator) { | |
| // Laravel uses Carbon. Just `use Carbon\Carbon;` it | |
| $day = Carbon::parse($value)->dayOfWeek; | |
| switch (strtolower($parameters[0])) { | |
| case 'sunday': | |
| return $day == 0; |
| <?php | |
| namespace App\Exceptions; | |
| use Exception; | |
| use Illuminate\Auth\AuthenticationException; | |
| // Don't forget to add this line as it is used by renderHttpException() | |
| use Symfony\Component\HttpKernel\Exception\HttpException; |