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
const startedTime = '14:30'; | |
const completedTime = '01:15'; | |
const startedDate = '20/01/2019'; | |
if (completedTime < startedTime) { | |
const [day, month, year] = startedDate.split('/'); | |
const currentDate = new Date(Date.parse(`${year}-${month}-${day}`)); | |
const currentDateUnix = currentDate.valueOf(); | |
const newDateUnix = currentDateUnix + 24*60*60*1000; |
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 findParentTagId(childClass, parentTag) { | |
var element = document.querySelector(childClass); | |
var tag = element.tagName; | |
// repeat until you get to body | |
while (tag != 'body') { | |
element = element.parentElement; | |
if (element.tagName.toLowerCase() === parentTag.toLowerCase()) { | |
var dataset = element.dataset['id']; | |
return document.querySelector('[data-id="' + dataset + '"]'); |
NewerOlder