Skip to content

Instantly share code, notes, and snippets.

@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 February 5, 2025 09:00
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" >
@mehranhadidi
mehranhadidi / !NOTE.md
Created August 15, 2017 08:52 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
@igorbenic
igorbenic / desc.php
Last active February 21, 2024 21:32
How to Programmatically Change Yoast SEO Open Graph Meta | http://www.ibenic.com/programmatically-change-yoast-seo-open-graph-meta
<?php
function change_yoast_seo_og_meta() {
add_filter( 'wpseo_opengraph_desc', 'change_desc' );
}
function change_desc( $desc ) {
// This article is actually a landing page for an eBook
if( is_singular( 123 ) ) {