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($, undefined) { | |
var uiPopoverClasses = 'ui-popover '; | |
var openPopover = null; | |
$.widget("ui.popover", { | |
// Default options | |
options: { | |
offsetX: 0, |
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
.twitter-typeahead .tt-hint { | |
border: 0; | |
padding: 0; | |
} | |
.tt-dropdown-menu { | |
min-width: 160px; | |
margin-top: 2px; | |
padding: 5px 0; | |
background-color: #fff; |
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
/** | |
* Calculates the specificity of CSS selectors | |
* http://www.w3.org/TR/css3-selectors/#specificity | |
* | |
* Returns an array of objects with the following properties: | |
* - selector: the input | |
* - specificity: e.g. 0,1,0,0 | |
* - parts: array with details about each part of the selector that counts towards the specificity | |
*/ | |
var SPECIFICITY = (function() { |
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
// This snippets shows how you can inject and execute Javascript in your Selenium tests using camme/debriverjs. | |
// This particular example uses jQuery to get the count of list-item elements on the page and returns it. | |
// In the callback you can then access the returned value as `result.value` | |
it('must have 4 list-item elements', function (done) { | |
client | |
.execute(function() { | |
return $('ul li').length; | |
}, [], function (err, result) { | |
result.value.must.eql(4); |
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
<!-- In your HTML | |
We need to catch errors globally. | |
This example shows how to do it on test environment only, in EJS on node.js. | |
The principle remains the same regardless of backend or templating language | |
--> | |
<% if (env === 'test') { %> | |
<!-- Error logging for selenium --> | |
<script type="text/javascript"> | |
"use strict"; |
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 | |
// Place this file in th same directory with your Dashlane Export.csv | |
// and run using the following command in your Terminal: | |
// | |
// php convert.php | |
// | |
// This will create a file named fixed.csv, which should work for | |
// 1Password 6 import. In addition to moving fields into correct places, | |
// this will also try to remove hashed lines {...}, as well as lines where |
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 | |
// add custom voucher fields - see: https://cl.ly/323U011F0C2u | |
add_filter( 'wc_pdf_product_vouchers_voucher_fields', 'my_voucher_fields' ); | |
function my_voucher_fields( $fields ) { | |
$fields['my_property'] = array( | |
'data_type' => 'property', | |
'label' => __( 'My property', 'my-plugin' ), |