Skip to content

Instantly share code, notes, and snippets.

View BKeanu1989's full-sized avatar

Kevin Fechner BKeanu1989

View GitHub Profile
@BKeanu1989
BKeanu1989 / project-ideas.txt
Last active November 2, 2017 11:18
Project Ideas
Chrome Extension
Is my site online?
-- done. could be reworked, but it's working ... No need to change it
https://github.com/BKeanu1989/chrome-is_my_site_online
Crawler Software
Nightmare-js with Electron & daydream
-- not working on it anymore. It has been a fun but short project
@BKeanu1989
BKeanu1989 / startup-&-general-ideas.txt
Created September 21, 2017 11:24
some ideas from my youth & now
baloons
coffee cups
vid compilations
@BKeanu1989
BKeanu1989 / Mini Features
Created September 29, 2017 14:47
Web API's to use/learn next...
IntersectionObserver
Lazy loading of content
Web Speech API
https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API
Recognition & synthesis
PaymentRequest API
https://developers.google.com/web/fundamentals/payments/
@BKeanu1989
BKeanu1989 / getPositionofelement.js
Created September 29, 2017 18:58
cumulativeOffset
var cumulativeOffset = function(element) {
var top = 0, left = 0;
do {
top += element.offsetTop || 0;
left += element.offsetLeft || 0;
element = element.offsetParent;
} while(element);
return {
top: top,
@BKeanu1989
BKeanu1989 / IntersectionObserver-polyfill.js
Last active October 8, 2017 09:34
IntersectionObserver Polyfill
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@BKeanu1989
BKeanu1989 / functions.php
Last active February 15, 2018 18:39
write to log - wordpress debug log
if (!function_exists('write_log')) {
function write_log ( $log ) {
if ( true === WP_DEBUG ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
}
function myplugin_plugin_path() {
// gets the absolute path to this plugin directory
return untrailingslashit( plugin_dir_path( __FILE__ ) );
}
add_filter( 'woocommerce_locate_template', 'myplugin_woocommerce_locate_template', 10, 3 );
@BKeanu1989
BKeanu1989 / qwertee-show-all-prices.js
Created April 26, 2018 14:28
qwertee show all prices nerdy script
function showPrices() {
let prices = Array.from(document.querySelectorAll('.index-tee-list-item span.product-price'));
prices.forEach(function(price) {
price.style.display = "block";
})
}
function throttle(func, wait, options) {
var context, args, result;
var timeout = null;
<?php
/*
Plugin Name: Page Template Plugin : 'Good To Be Bad'
Plugin URI: http://www.wpexplorer.com/wordpress-page-templates-plugin/
Version: 1.1.0
Author: WPExplorer
Author URI: http://www.wpexplorer.com/
*/
class PageTemplater {
/Applications/MAMP/bin/php/php7.1.22/bin/phpize --with-php-config=/Applications/MAMP/bin/php/php7.1.22/bin/php-config