Skip to content

Instantly share code, notes, and snippets.

@just-boris
just-boris / debounce.js
Created May 31, 2020 12:16
small debounce implementation without lodash
export const DEBOUNCE_DEFAULT_DELAY = 200;
export default function debounce(func, delay = DEBOUNCE_DEFAULT_DELAY) {
let timeout;
return function(...args) {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(() => {
@CiprianSpiridon
CiprianSpiridon / Laravel-Blade-Template-Cheatsheet
Last active February 27, 2024 05:39
Laravel Blade Template Cheatsheet
{{ $var }} - Echo content
{{ $var or 'default' }} - Echo content with a default value
{{{ $var }}} - Echo escaped content
{{-- Comment --}} - A Blade comment
@extends('layout') - Extends a template with a layout
@if(condition) - Starts an if block
@else - Starts an else block
@elseif(condition) - Start a elseif block
@endif - Ends a if block