Skip to content

Instantly share code, notes, and snippets.

@jonneroelofs
jonneroelofs / Player.blade.php
Created March 1, 2022 15:23
Files belonging to Livewire explained: Emitting events using emit, emitUp and emitTo (an event based Guessing game) (https://youtu.be/DN-ABpxnrrI)
<div class="shadow border-2 rounded p-1">
<div class="flex justify-between gap-4">
<h2>Player</h2>
</div>
<x-list-texts :texts="$myText"></x-list-texts>
<div>
<x-list-listeners :listeners="$this->getListeners()"></x-list-listeners>
</div>
@kepano
kepano / obsidian-web-clipper.js
Last active November 14, 2024 04:15
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@kiddtang
kiddtang / .env
Last active December 21, 2023 09:25
proxy-manager
APP_PORT=48080
FORWARD_DB_PORT=43306
FORWARD_REDIS_PORT=46379
FORWARD_MEILISEARCH_PORT=47700
FORWARD_MAILHOG_PORT=41025
FORWARD_MAILHOG_DASHBOARD_PORT=48025
@Loupeznik
Loupeznik / DashboardController.php
Last active September 17, 2022 12:21
Laravel Visitor Counter - data visualization
// app/Http/Controllers/DashboardController.php
<?php
namespace App\Http\Controllers;
use App\Models\Visitor;
use Illuminate\Support\Facades\DB;
class DashboardController extends Controller
{
@DoctorDerek
DoctorDerek / recommended-settings.json
Last active March 31, 2024 07:31
Recommended settings.json file for new web developers setting up VS Code according to https://medium.com/p/65aaa5788c0d/ by Dr. Derek Austin 🥳
@NandoKstroNet
NandoKstroNet / contact-create.blade.php
Created October 27, 2020 16:58
View Componente Livewire com Bootstrap
<div>
<h2>Criar Contato</h2>
<div>
<form wire:submit.prevent="create" method="post">
<div class="col-12">
@if (session()->has('message'))
<div class="alert alert-danger">
{{ session('message') }}
@frv-dev
frv-dev / settings.json
Created October 26, 2020 17:32
[Code Easy - DON'T REMOVE] Settings for VSCode + PHP
{
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 3,
"editor.formatOnSave": true,
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/.hg/store/**": true,
"**/vendor/*/**": true
@evansims
evansims / Dockerfile
Last active September 16, 2024 07:08
Dockerfile: php-fpm 7.4-fpm alpine w/ gd bz2 intl mbstring redis mongodb xdebug opcache
FROM php:7.4-fpm-alpine
WORKDIR "/application"
# Install essential build tools
RUN apk add --no-cache \
git \
yarn \
autoconf \
g++ \
make \
@mingalevme
mingalevme / php-redis-custom-flags.sh
Created March 1, 2020 11:46
Installing PHP Redis extension inside PHP-Alpine-based Docker container
NPROC=$(getconf _NPROCESSORS_ONLN)
mkdir -p /usr/src/php/ext
cd /usr/src/php/ext
pecl bundle redis
docker-php-ext-configure redis --enable-redis-igbinary --enable-redis-lzf
docker-php-ext-install -j${NPROC} redis
cd -
@caspark
caspark / slash-search.js
Created January 19, 2020 22:26
Google slash search
// ==UserScript==
// @name Google Slash Search
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.google.com/search*
// @grant none
// ==/UserScript==