How to Use Node.js and Github Webhooks to Keep Remote Projects in Sync
FYI: this has nothing to do with SSH keys - therefore private repos wont work with this.
const secret = 'your_secret_here';
const repopwd = '/your_repo_path_here/';
// Remove Block Suggestions in wp-admin Block Directory | |
function chuckdev_remove_block_directory() { | |
wp_add_inline_script( | |
'wp-block-editor', | |
"wp.domReady( () => wp.plugins.unregisterPlugin( 'block-directory' ) )" | |
); | |
} | |
add_action( 'admin_enqueue_scripts', 'chuckdev_remove_block_directory' ); |
const wmeAuthUrl = 'https://auth.enterprise.wikimedia.com/v1/login'; | |
const wmeUsername = pm.collectionVariables.get("wmeUsername"); | |
const wmePassword = pm.collectionVariables.get("wmePassword"); | |
const getTokenRequest = { | |
method: 'POST', | |
url: wmeAuthUrl, | |
header: 'Content-Type:application/json', | |
body: { | |
mode: 'application/json', |
/* | |
* Twitch Helix OAuth2 Postman Pre-Request Script | |
* @see https://dev.twitch.tv/docs/authentication#registration | |
* @see https://learning.postman.com/docs/writing-scripts/pre-request-scripts/ | |
*/ | |
const authUrl = 'https://id.twitch.tv/oauth2/token'; | |
const clientId = pm.collectionVariables.get('clientId'); | |
const clientSecret = pm.collectionVariables.get('clientSecret'); |
FYI: this has nothing to do with SSH keys - therefore private repos wont work with this.
const secret = 'your_secret_here';
const repopwd = '/your_repo_path_here/';
client.on('message', (channel, tags, message, self) => { | |
if(self) return; | |
const { badges, 'badge-info': badgeInfo } = tags; | |
let isSubscriber = false; | |
let monthsSubbed = -1; | |
if(badges) { | |
isSubscriber = badges.subscriber || badges.founder; | |
if(isSubscriber) { | |
monthsSubbed = badgeInfo.subscriber || badgeInfo.founder; | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Lazy load youtube embed</title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
<main> | |
<h1>Example of a lazy loaded embedded YouTube video</h1> | |
<iframe |
/** | |
* Register hero block | |
*/ | |
add_action('acf/init', 'hero'); | |
function hero() { | |
// check function exists | |
if( function_exists('acf_register_block') ) { | |
// register a hero block |
Status Code URL IP Page Type Redirect Type Redirect URL | |
302 https://astro.family/Clintus 67.199.248.13 server_redirect temporary http://www.avantlink.com/click.php?tt=cl&merchant_id=a9357ec0-3e82-4d28-beb7-8f1a7468ca28&website_id=e00bfdff-cfb5-4645-bd88-ebb2d1f7c63a&url=http://buy.astrogaming.com/store/logib2c/html/pbPage.astro-affiliate/OfferID.60188315901/ThemeID.4807228000 | |
302 http://www.avantlink.com/click.php?tt=cl&merchant_id=a9357ec0-3e82-4d28-beb7-8f1a7468ca28&website_id=e00bfdff-cfb5-4645-bd88-ebb2d1f7c63a&url=http://buy.astrogaming.com/store/logib2c/html/pbPage.astro-affiliate/OfferID.60188315901/ThemeID.4807228000 54.158.229.114 server_redirect temporary https://classic.avantlink.com/click.php?tt=cl&merchant_id=a9357ec0-3e82-4d28-beb7-8f1a7468ca28&website_id=e00bfdff-cfb5-4645-bd88-ebb2d1f7c63a&url=http://buy.astrogaming.com/store/logib2c/html/pbPage.astro-affiliate/OfferID.60188315901/ThemeID.4807228000 | |
302 https://classic.avantlink.com/click.php?tt=cl&merchant_id=a9357ec0-3e82-4d28-beb7-8f1a7468 |
// API specific settings https://openweathermap.org/current | |
const API_URL = 'https://api.openweathermap.org/data/2.5/weather'; | |
const API_KEY = ''; | |
const LOCATION_CODE = ''; | |
const FULL_API_URL = `${API_CURRENT_URL}?id=${LOCATION_CODE}&appid=${API_KEY}`; | |
axios | |
.get(FULL_API_CURRENT_URL) | |
.then(response => { | |
// Assign vars to response data |
{ | |
"id": "average", | |
"metadata": { | |
"operation": "retrieve", | |
"provider": "Oxford University Press", | |
"schema": "RetrieveEntry" | |
}, | |
"results": [ | |
{ | |
"id": "average", |