Skip to content

Instantly share code, notes, and snippets.

View rniswonger's full-sized avatar
🖖

Ryan Niswonger rniswonger

🖖
View GitHub Profile
@psaikali
psaikali / acf-gravity-forms-field.php
Created January 4, 2019 13:43
Populate ACF select field options with Gravity Forms to select a specific form
<?php
/**
* Populate ACF select field options with Gravity Forms forms
*/
function acf_populate_gf_forms_ids( $field ) {
if ( class_exists( 'GFFormsModel' ) ) {
$choices = [];
foreach ( \GFFormsModel::get_forms() as $form ) {
$choices[ $form->id ] = $form->title;
@winuxue
winuxue / puppeteer-ubuntu-1804.md
Created May 22, 2019 01:15
Solution for common dependences issues using puppeteer in ubuntu 18.04 (Bionic)

puppeteer dependeces in ubuntu 18.04 (Bionic)

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

sudo apt-get install libnss3

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libxss1
@plasticmind
plasticmind / functions.php
Last active July 14, 2022 09:41
Adding column count class to Gutenberg columns block
<?php
/**
* inject_class_column_count
*
* @param string $content The block content about to be appended.
* @param array $block The full block, including name and attributes
* @return $content;
*/
function inject_class_column_count( $content, $block ) {
if ( ! is_block_type( $block, "core/columns" ) ) {
@rniswonger
rniswonger / bookmarklet-fix-gmail-desktop-annoyances.js
Last active August 24, 2023 16:47
A bookmarklet that resizes image and table content in Gmail messages to prevent horizontal scrolling.
javascript: (() => { let style = document.createElement("style"); style.innerHTML = ` .a3s table { width: 90% !important; } .a3s img { max-width: 90% !important; height: auto !important; } tr:has(.ast) { display: none !important; } `; document.head.appendChild(style);})();