Skip to content

Instantly share code, notes, and snippets.

@localdisk
localdisk / Tagify.php
Last active October 17, 2022 17:04
Livewire Tagify Component
<?php
namespace App\Http\Livewire;
use App\Models\Tag;
use Illuminate\View\View;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\Container\BindingResolutionException;
use Livewire\Component;
@vejnoe
vejnoe / webflow-breakpoints.css
Last active July 17, 2024 22:36
Webflow Standard Breakpoints
@media screen and (max-width: 991px) {
/* Your responsive CSS */
}
@media screen and (max-width: 767px) {
/* Your responsive CSS */
}
@media screen and (max-width: 479px) {
/* Your responsive CSS */
}
@cspags
cspags / reset-webflow-form.js
Last active September 25, 2023 16:17
Webflow - Reset a form to it's original state after it is submitted, instead of showing the success message
$(function() {
/*** START SCRIPT CONFIG ***/
// Replace with value for your form. ie. "#your-form-id" or ".your-form-class"
var FORM_SELECTOR = ".recipe-form";
// Do you want to hide the success message after the form is submitted?
var HIDE_SUCCESS_MESSAGE = false;
// Do you want the success message to show above the form?
@ulcuber
ulcuber / .phpcs.xml
Created October 27, 2019 10:27
PSR12 laravel phpcs config
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
<description>The Laravel Coding Standards</description>
<file>app</file>
<file>config</file>
<file>resources</file>
<file>routes</file>
<file>tests</file>
@geoffyuen
geoffyuen / readme.md
Created November 22, 2018 15:56
Import CSV into ACF Repeater (Wordpress)
@coreymcollins
coreymcollins / archive-page-title.php
Last active January 9, 2019 17:37
Reusable Snippets Post
<?php
function _s_remove_archive_title_prefix( $title ) {
// Get the single category title with no prefix.
$single_cat_title = single_term_title( '', false );
if ( is_category() || is_tag() || is_tax() ) {
return esc_html( $single_cat_title );
}
@fzldn
fzldn / beautifier.js
Last active March 17, 2025 02:29
VS Code Laravel Blade formatter using extension Beautify 1.5.0 by HookyQR with js-beautify hacks
...
Beautifier.prototype.beautify = function() {
...
var source_text = this._source_text;
// BEGIN
source_text = source_text.replace(/\{\{(--)?((?:(?!(--)?\}\}).)+)(--)?\}\}/g, function(m, ds, c, dh, de) {
@timacdonald
timacdonald / ContactIndexResponse.php
Last active February 9, 2023 21:48
Easily respond to content types and url extensions
<?php
namespace App\Http\Responses;
use App\Models\ContactType;
use App\Factories\CsvFactory;
class ContactIndexResponse extends Response
{
public function __construct($contacts)
@koop
koop / ensure-cert-macos.sh
Created November 28, 2017 20:27
Ensures a certificate is in the macOS system keychain.
#!/bin/bash
# Usage
# $ ./install-cert-macos.sh "/path/to/cert"
CERT_PATH="$1"
# First, grab the SHA-1 from the provided SSL cert.
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g")
# Next, grab the SHA-1s of any standard.dev certs in the keychain.
# Don't return an error code if nothing is found.
@sam0737
sam0737 / clock.html
Last active June 16, 2026 12:15
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >