This file contains hidden or 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 | |
# This script runs the homebrew updater, then reports if any of your packages are out of date | |
# Generally, this should be run automatically using a launchctl task (see end of file for an example) | |
# | |
# In addition, you might want to change the notification style to be an "alert" so it hangs around a while. | |
# This can be done in System Preferences -> Notification Center (look for homebrew-notifier) | |
# | |
# Requires: | |
# - Homebrew | |
# - terminal-notifier (brew install terminal-notifier) |
This file contains hidden or 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
var selectedIssue = document.querySelectorAll(".ghx-selected")[0]; | |
var key = selectedIssue.dataset.issueKey; | |
var description = selectedIssue.childNodes[0].childNodes[0].childNodes[2].title; | |
var text = key + '-' + description; | |
var MAX_LENGTH = 35; | |
var slug = text.replace(/\s+/g, '-').replace(/[^\w\-]+/g, '').replace(/\-\-+/g, '-').replace(/^-+/, '').replace(/-+$/, '').substring(0, MAX_LENGTH); | |
window.prompt("Copy this!", 'git checkout -b \'' + slug + '\''); |
This file contains hidden or 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
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I) | |
if(!!window.React || | |
!!document.querySelector('[data-reactroot], [data-reactid]') || | |
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer'))) | |
) | |
console.log('React.js'); | |
if(!!document.querySelector('script[id=__NEXT_DATA__]')) | |
console.log('Next.js'); |
This file contains hidden or 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
import { LightningElement, wire } from 'lwc'; | |
import { CurrentPageReference } from 'lightning/navigation'; | |
export default class PageRefDemo extends LightningElement { | |
@wire(CurrentPageReference) | |
currentPageReference; | |
handleDisplayPageRefObj(){ | |
const pageRefObj = JSON.stringify(this.currentPageReference, null, 4); |