Skip to content

Instantly share code, notes, and snippets.

View ArtMin96's full-sized avatar

Arthur Minasyan ArtMin96

  • Yerevan, Armenia
  • 17:44 (UTC +04:00)
View GitHub Profile
@fotrino
fotrino / CreateComment.php
Created September 28, 2021 14:35
@mentions with Alpine.js, Livewire & Tributeq
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\User;
class CreateComment extends Component
{
public $mentionables;
@glueckpress
glueckpress / browser-width.js
Last active August 11, 2019 14:21 — forked from aarongustafson/watchResize.js
Track browser size in real time, do stuff at certain breakpoints. A JavaScript media query, essentially. Borrowed from @aarongustafson.
// watch browser width on resize
var browser_width = 0;
window.watchResize(function(){
browser_width = window.innerWidth || document.body.offsetWidth;
});
// do stuff after breakpoint
window.watchResize(function(){
var threshold = 400;
if ( browser_width >= threshold ) {
@sunel
sunel / Debug.php
Created January 30, 2015 10:48
PHP Pretty var_dump
<?php
class Debug {
/**
* A collapse icon, using in the dump_var function to allow collapsing
* an array or object
*
* @var string
*/