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
<elementname(?:.*?(\n){0,}){1,}?.*?attributename |
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
#!/bin/bash | |
_project="project" | |
_env="local" | |
_root="/mnt/c/work/hmr/backups" | |
_webdir="web" | |
_webext=".tar.gz" | |
if [ -n "$1" ] && [ "$1" != " " ]; then | |
_suffix="-$1" |
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
[ | |
{ | |
"key": "shift+alt+cmd+l", | |
"command": "editor.action.insertSnippet", | |
"when": "editorTextFocus", | |
"args": { | |
"snippet": "console.log('${TM_SELECTED_TEXT}$1: ', ${TM_SELECTED_TEXT})$2;" | |
} | |
}, | |
{ |
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
const sidebar = document.querySelectorAll('[data-testid=sidebarColumn]')[0]; | |
const trending = sidebar.querySelector('div > div > div > div > div > div:nth-child(3)'); | |
trending.style.display = 'none'; |
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
console.log(JSON.stringify(obj, null, 2)); |
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
curl -I http://site.test |
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
<StyledDialog[\n\s][\s\S]*?size=({'|')xs |
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
// year of car | |
document.querySelector('.details-wrapper h1').innerText.split(' ')[0] | |
// odometer | |
Number(document.querySelector('.key-details-item-title').innerText.split(' ')[0].replace(/,/g, ''))/20000 | |
// 20000 km average a year |
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_filter( 'woocommerce_get_price_html', 'my_price_html', 100, 2 ); | |
function my_price_html( $price, $product ){ | |
// swap the regular and sale prices | |
$pos_start = strpos($price, '<del>'); | |
if ($pos_start !== false) { | |
$end = '</del>'; | |
$end_length = strlen($end); | |
$pos_end_start = strpos($price, $end); | |
$pos_end = $pos_end_start + $end_length; |
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 | |
// Apply Bootstrap 4 custom checkboxes and radio buttons to Gravity Fields generated forms | |
// Derived from https://jayhoffmann.com/using-gravity-forms-bootstrap-styles/ | |
add_filter( 'gform_field_container', 'add_bootstrap_control_class', 10, 6 ); | |
function add_bootstrap_control_class( $field_container, $field, $form, $css_class, $style, $field_content ) { | |
$id = $field->id; | |
$field_id = is_admin() || empty( $form ) ? "field_{$id}" : 'field_' . $form['id'] . "_$id"; |
NewerOlder