View .editorconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 4 | |
trim_trailing_whitespace = true |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'gform_submit_button', 'form_submit_button', 10, 2 ); | |
function form_submit_button( $button, $form ) { | |
$svg = '<svg xmlns="http://www.w3.org/2000/svg" width="71.242" height="17.625" viewBox="0 0 71.242 17.625" class="javaVictorButton"><g id="button" transform="translate(-1095.422 -2403.444)"><path id="Path_535" data-name="Path 535" d="M-17503.5,2646.988h9.877l3.248-6.42,4.66,10.453,5.086-10.453,5.117,10.453,5.441-10.453h0l5.008,10.453,4.754-10.453,3.191,6.42h20.012" transform="translate(18598.922 -233.632)" fill="none" stroke="#fff" stroke-width="3"></path><path id="Path_536" data-name="Path 536" d="M-17295.016,2609l9.115,7.709-9.115,6.06" transform="translate(18450.072 -202.949)" fill="none" stroke="#fff" stroke-width="3"></path></g></svg>'; | |
return "<button class='elementor-button-link elementor-button elementor-size-md' id='gform_submit_button_{$form['id']}'> | |
<span class='elementor-button-content-wrapper'> | |
<span class='elementor-button-icon elementor-align-ic |
View injecter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.website.com/?service_code=secretcode | |
$.urlParam = function (name) { | |
var results = new RegExp('[\?&]' + name + '=([^&#]*)') | |
.exec(window.location.search); | |
return (results !== null) ? results[1] || 0 : false; | |
} | |
// Gravity form field ID |
View listingpro-yoast.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_listingpro_meta(){ | |
$meta = get_post_custom_values('lp_listingpro_options'); | |
return unserialize($meta[0]); | |
} | |
function get_listingpro_address($test) { | |
$listing_meta = get_listingpro_meta(); |
View sample.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Exceptions; | |
use Exception; | |
use Illuminate\Auth\AuthenticationException; | |
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
class Handler extends ExceptionHandler | |
{ |
View .babelrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"plugins": [ | |
"transform-object-rest-spread", | |
"transform-class-properties", | |
"transform-react-constant-elements", | |
"transform-decorators-legacy" | |
], | |
"presets": [ | |
["es2015", {"modules": false}], | |
"react" |
View wp-multisite-cron.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Since WordPress is event driven, the wp-cron's will run on every single page load. | |
* This means if you have a larger WordPress site your doing a lot of extra leg work for noreason. | |
* This fixes that on Multsites | |
* | |
* Add this file to the root of your WordPress site and then add define('DISABLE_WP_CRON', 'true'); | |
* to your wp-config.php | |
* | |
* Make sure that you create a true CRON job that will call your site URL via curl |
View table-size.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; |
View routes-and-controllers.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
I am using route caching that prevents me from using closures, but even then I don't see why I can't choose to pass static information to a controller without using route parameters. | |
For example, My project has an umber of redirects in it, and rather than loading up 40 domains with redirect DNS entries that only I have access to. | |
I have a helper controller to do this so that my team may make entries. | |
I am running 40 unique sites out of one Laravel instance to keep my maintenance low. 40 sites x about 25 redirects is a lot of DNS entries. | |
*/ |
View gist:b4c4c030f03c27f90d3257e5015d18f6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('cacheBuster', function(cb){ | |
//new Date().getTime() | |
fs.writeFile('config/cacheBuster.php', '<?php return ' + new Date().getTime() + ';', cb); | |
}); |
NewerOlder