Skip to content

Instantly share code, notes, and snippets.

View jrfoell's full-sized avatar
🤓

Justin Foell jrfoell

🤓
View GitHub Profile
@jrfoell
jrfoell / page-list.php
Created April 15, 2020 22:22
Specific Pagination Example
#!/usr/bin/env php
<?php
$page = 9;
$max = 16;
$pages = range( 1, $max );
echo "Current page: {$page}\n";
// Case 1 (7 or less pages)
@jrfoell
jrfoell / KeybindingRemap.py
Created December 15, 2019 23:04
Nautilus extension to remap keyboard shortcuts
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on BackspaceBack.py https://github.com/riclc/nautilus_backspace
# originally by Ricardo Lenz riclc@hotmail.com
#
import os, gi
gi.require_version('Nautilus', '3.0')
from gi.repository import GObject, Nautilus, Gtk, Gio, GLib
<?php
add_action( 'init', function() {
if ( class_exists( 'AcfFieldMultipleCategories' ) || ! class_exists( 'acf_field_taxonomy' ) ) {
return;
}
/**
* Class for ACF field.
*/
<?php
if ( ! class_exists( 'AcfFieldMultipleCategories' ) && class_exists( 'acf_field' ) ) {
class AcfFieldMultipleCategories extends acf_field {
/**
* This function will setup the field type data.
*
@jrfoell
jrfoell / acf-input.js
Last active July 15, 2019 19:52
newSelect2 from ACF 5.6.5
/**
* acf.newSelect2
*
* description
*
* @date 13/1/18
* @since 5.6.5
*
* @param type $var Description. Default.
* @return type Description.
@jrfoell
jrfoell / 0_reuse_code.js
Created August 18, 2014 14:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console