Skip to content

Instantly share code, notes, and snippets.

View Braunson's full-sized avatar

Braunson Yager Braunson

View GitHub Profile
{{--
Icon view component for Laravel 7.
@disclaimer The icons used in this component are taken from "Refactoring UI Heroicons" (md-outline collection).
For more info https://github.com/refactoringui/heroicons by Steve Schoger & Adam Wathan.
@copyright MIT
@author Maurizio <https://twitter.com/mauriziolepora>
@mattstauffer
mattstauffer / example.html
Created March 3, 2020 15:46
Example of logging Laravel Livewiure component state
<script src="{{ asset('js/app.js') }}"></script>
<script>
let logComponentsData = function () {
window.livewire.components.components().forEach(component => {
console.log(component.name);
console.log(component.data);
});
};
document.addEventListener("livewire:load", function(event) {
@calebporzio
calebporzio / RouteDirectives.php
Created January 4, 2020 10:33
Blade Route Directives
<?php
// Register these inside a service provider:
Blade::directive('route', function ($expression) {
return "<?php echo route({$expression}) ?>";
});
Blade::directive('routeIs', function ($expression) {
return "<?php if (request()->routeIs({$expression})) : ?>";
@IanColdwater
IanColdwater / twittermute.txt
Last active June 15, 2025 16:53
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@ManojKiranA
ManojKiranA / full.php
Last active December 21, 2021 01:39
Inertia Js Paginate
Route::get('/', function (\Illuminate\Http\Request $request) {
$initialSearch = $request->query('search', '');
$userQuery = User::query()
->when($request->filled('search'),function($query) use ($initialSearch){
$query->where('name','LIKE','%'.$initialSearch.'%')
->orWhere('email','LIKE','%'.$initialSearch.'%');
});
/* dragging logic for nomadlist.com/dating */
/* by @levelsio */
/* MIT license */
/* <dragging logic> */
$('body').on('mousedown touchstart','.card',function(e) {
if(!currentCardUserId) return;
if($('card.match_card').is(':visible')) return;
if(typeof e.originalEvent.touches !=='undefined') {
/* touch device */
@stefanzweifel
stefanzweifel / format_php.yml
Last active September 29, 2021 08:29
GitHub Actions Workflows to run prettier and php-cs-fixer automatically
name: Format PHP
on:
pull_request:
paths:
- '*.php'
jobs:
php-cs-fixer:
runs-on: ubuntu-latest

Learning Plan for Design Patterns and Principles of Good Design

These learning resources primarily focus on programming using Good Design Principles and Design Patterns

  • There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
@stevebauman
stevebauman / DirectoryMounter.php
Last active June 18, 2020 17:29
PHP Windows Directory Mounter
<?php
use UnexpectedValueException;
class DirectoryMounter
{
/**
* The path to mount.
*
* @var string|null
@giovanni-d
giovanni-d / allinonemigration.md
Last active July 6, 2025 14:50
All-in-One WP Migration - Restore From Server (without PRO version) - Restore

All-in-One WP Migration Restore From Server (without pro version)

If you don't want to pay for the PRO version of this plugin, and you want to use the "Restore from Server" functionally that was present in the version 6.77, open your browser’s dev tools and run the code below in the console:

Last confirmed working: May 2025 on version 7.94

var filename = 'FILENAME.wpress';