Skip to content

Instantly share code, notes, and snippets.

@atwellpub
atwellpub / Google App Script - Replace Slide Content Using Google Sheet Data.js
Last active May 2, 2024 05:21
Google Apps Script function to replace text in Google Slides with Google Sheet values
/**
* Function to replace text in Google Slides with Google Sheet values
* @reference https://hudsonatwell.co/2020/10/03/how-to-use-google-slides-to-autogenerate-featured-images/
*/
function generate_featured_image() {
/* get spreadsheet from public view link */
var dataSpreadsheetUrl = "https://docs.google.com/spreadsheets/d/1necmbNPUsGJ3fwNiFpgNLbtH6c2RmJDwIQCPuhAfA7s/edit"; //make sure this includes the '/edit at the end
var ss = SpreadsheetApp.openByUrl(dataSpreadsheetUrl);
@comp500
comp500 / fabricserversidemods.md
Last active April 15, 2024 20:13
Useful Fabric server side mods
@spivurno
spivurno / gw-gravity-forms-user-registration-ignore-update-feeds.php
Last active November 27, 2017 03:48
Gravity Wiz // Gravity Forms // User Registration // Ignore Update Feed for Non-logged-in Users
<?php
/**
* Gravity Wiz // Gravity Forms // User Registration // Ignore Update Feed for Non-logged-in Users
*
* Ignore update feeds for users who are not logged in.
*
* @version 0.1
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/
@spivurno
spivurno / gw-gravity-forms-user-registration-skip-registration-for-existing-email.php
Last active September 14, 2021 13:01
Gravity Wiz // Gravity Forms // User Registration // Skip Registration if Email Exists
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-user-registration-skip-registration-for-existing-email.php
*/
/**
* Gravity Wiz // Gravity Forms // User Registration // Skip Registration if Email Exists
*
* If submitted email is already registered, skip registration.
@lmarkus
lmarkus / README.MD
Last active May 18, 2024 01:22
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

//Example 1
{"2771":["2015/04/21 16:52:53"],
"2794":{"1":"2015-04-21 13:05:06 UTC"},
"2734":{"1":"2015-04-21 13:07:02 UTC"}}
//Example 2
{"26":{"0":"2014/07/30 13:44:40",
"1":"2014/07/30 14:40:12",
"2":"2014/07/30 14:51:41",
"3":"2014/07/31 17:45:26",
@atwellpub
atwellpub / readme.md
Last active August 29, 2015 14:16
Tweet to download js enqueues and inline javascript within a call to action templat

Problems

wp_enqueue_script commands will not work in the admin_print_footer_scripts, but admin_print_footer_scripts is good for printing inline javascript code. wp_enqueue_script commands will work in the admin_enqueue_scripts hook, but get_current_screen() will not return any information from within the admin_enqueue_scripts hook.

Solutions

Break the enqueues and then inline js into two different hooks and methods using admin_print_footer_scripts for the inline js and admin_enqueue_scripts for the library enqueues.

In order to make sure we are only loading the js libraries on the call to action post type (without the use of get_current_screen()) we will have to use the global $post object, cause it is available inside the admin_enqueue_scripts hook: