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
$(document).ready(function($){ | |
var anchorElements = $('a'); | |
var eventDefaults = { | |
category: 'Links', | |
value: 0 | |
} | |
var fileTypes = new RegExp(/\.(docx*|xlsx*|pptx*|zip|pdf)$/i); | |
var mailtoPattern = new RegExp('/mailto:/'); |
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
[ | |
{ | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
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
describe('Mock jQuery calls with Jasmine', function() { | |
it('how to mock $("test").show()', function() { | |
// mock the call | |
spyOn($.fn, 'show').andCallFake(function() { | |
return true; | |
}); | |
// now we can call the mock | |
result = $("test").show(); |
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 | |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
require_once WP_CONTENT_DIR.'/plugins/amazon-web-services/vendor/aws/aws-autoloader.php'; | |
use \Aws\S3\S3Client; | |
add_filter('gform_upload_path', 'gform_change_upload_path', 10, 2); | |
add_action('gform_after_submission', 'gform_submit_to_s3', 10, 2); | |
//change gravity form upload path to point to S3 |
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
git diff : compare current with staged (or with last commit if no staged one) | |
git diff —staged : compare staged with last commit | |
git diff <master>…<topicbr> : show diff introduced by topicbr comparing to master (base commit in master) | |
git diff <sha-1> : show diff betwheen latest commit of current branch and other commit (sha-1) | |
git log -n : view last n commits | |
git log -n -p : last n commits with summary of changes (diff) | |
git log -n —graph : graphical view branch history | |
git log —pretty=oneline : each commit at one line | |
git log <br1> —not <br2> : list commits which are in br1 but not in br2 |