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
{ | |
"require": { | |
"[username]/[repository-name]": "dev-master" | |
}, | |
"repositories": [ | |
{ | |
"type": "git", | |
"url": "https://github.com/[username]/[repository-name]" | |
} | |
], |
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 pickBy = require('lodash.pickby') | |
const validate = require('./schema-validator.js') | |
const DEFAULT_FILTERS = [ | |
{ | |
key: 'x-visibility', | |
value: 'EXTERNAL' | |
}, | |
{ | |
key: 'x-status', |
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 -X PUT \ | |
https://api.getpostman.com/collections/${POSTMAN_COLLECTION_UID} \ | |
-H "Content-Type: application/json" \ | |
-H "X-Api-Key: ${POSTMAN_API_KEY}" \ | |
-d @postman-collection.json |
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
func verifySignature(payload []byte, secret, receivedSignature string) (bool, error) { | |
signature, err := computeSignature(payload, secret) | |
if err != nil { | |
return false, err | |
} | |
return signature == receivedSignature, nil | |
} | |
func computeSignature(payload []byte, secret string) (string, error) { |
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_action( 'customize_register', 'test_customize_register' ); | |
function test_customize_register($wp_customize) { | |
$wp_customize->add_section( | |
'test_section', | |
array( | |
'title' => __( 'Test section', 'woocommerce' ), | |
'priority' => 10, |