Skip to content

Instantly share code, notes, and snippets.

View tpkemme's full-sized avatar

Tyler Kemme tpkemme

View GitHub Profile
@tpkemme
tpkemme / lifterlms-solstice-sidebar-compat.php
Last active December 9, 2016 00:10
Solstice sidebar compat
<?php // don't copy this line into your functions.php file!
/**
* Display LifterLMS Course and Lesson sidebars
* on courses and lessons in place of the sidebar returned by
* this function
* @param string $id default sidebar id (an empty string)
* @return string
*/
function my_llms_sidebar_function( $id ) {
@tpkemme
tpkemme / edit-mark-complete-btn-text.php
Created February 17, 2017 08:35
This filter for the LifterLMS Plugin lets you change the text of the Mark Complete button, but only for a specific course.
<?php // don't copy this line!!!
/**
* Displays custom text for the Mark Complete button but only for a
* specific course
*
* Added: 2-17-2017 Tyler Kemme
*/
function custom_mark_complete_text( $button_text, $lesson ) {
@tpkemme
tpkemme / tk-alfred-wpash.php
Last active April 1, 2017 19:26
Wordpress hash password and return results - Alfred Workflow
/**
* This php script queries a form at
* http://scriptserver.mainframe8.com/wordpress_password_hasher.php to get a
* hashed version of a provided or default password
*
* This script is run using the command 'wpash <password>'. If the command is run without
* any parameters it will return the hash of the string 'password'. If a parameter is provided
* (example: 'wpash P@s$w0rD'), this script will return the hash of the string 'P@s$w0rD'
* This can be used in an Alfred Workflow to hash passwords for Wordpress sites. A great tool
* for developers who manage databases for a lot of Wordpress sites
@tpkemme
tpkemme / background-three.json
Last active October 30, 2017 19:51
Background Pattern 3 JSON Data
{
"particles": {
"number": {
"value": 60,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
@tpkemme
tpkemme / background-four.json
Created October 30, 2017 20:14
Background Pattern 4 JSON Data
{
"particles": {
"number": {
"value": 60,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
@tpkemme
tpkemme / xdebug-setup.sh
Created December 11, 2017 19:39
Setup Xdebug on Mac with PHPStorm
# 1. Access box via ssh
vagrant ssh
# 2. Update packages and make sure debug is install
sudo apt-get update
sudo apt-get install php-xdebug
# 3. Open Xdebug Config File
@tpkemme
tpkemme / lifterlms-custom-profile-fields.php
Last active May 4, 2018 13:18
Custom Fields added to LifterLMS Registration/Checkout
<?php // don't copy this line to your functions.php file
/**
*
* Create Company Industry as a custom field upon registration or checkout
*
* @param $fields - fields already being registered
* @param $screen - either checkout or registration screen
* @return $fields - array with added field
*/
function add_company_industry_lifterlms ( $fields , $screen ) {
@tpkemme
tpkemme / tk-lipsum.php
Created April 1, 2017 19:27
Generates lorem ipsum from lipsum.com for Alfred Workflow
/**
* This php script queries a form at http://www.lipsum.com/ to get a
* hashed version of a provided or default password
*
* This script is run using the command 'lipsum p 4' where p stands for
* paragraph and 4 is the number of paragraphs. Other option is w for words.
*
*/
// Query in the form of two parameters 'type' and number of 'type'