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
<# Azure DevOps REST API #> | |
$url = 'https://dev.azure.com/{organization_name}/{project_name}/_apis/work/teamsettings/iterations?$timeframe=current&api-version=7.1-preview.1' | |
$Token = '{Azure DevOps PAT}' | |
if ($Token -eq "") { | |
Write-Host 'PAT not set' | |
exit 1 | |
} | |
$AzureAuthHeader = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f "", $Token))) |
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
<# Azure DevOps REST API #> | |
$url = 'https://dev.azure.com/{organization_name}/{project_name}/_apis/wit/queries?$expand=all&$depth=2&$includeDeleted=false&api-version=7.1-preview.2' | |
$Token = '{Azure DevOps PAT}' | |
if ($Token -eq "") { | |
Write-Host 'PAT not set' | |
exit 1 | |
} | |
$AzureAuthHeader = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f "", $Token))) |
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
#!/usr/bin/env bash | |
LC_ALL=C | |
local_branch="$(git rev-parse --abbrev-ref HEAD)" | |
valid_branch_regex="^(task|master|develop|qa|tb|bug|story)[a-z0-9._-]{2,10}$" | |
message="This branch violates the branch naming rules. Please rename your branch." | |
if [[ ! $local_branch =~ $valid_branch_regex ]] |
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
<# Azure DevOps REST API #> | |
$url1 = 'https://feeds.dev.azure.com/{organization}/_apis/packaging/Feeds/{feed_id}/packages?protocolType=npm&includeAllVersions=true&api-version=7.1-preview.1' | |
$Token = '{Personal_Access_Token}' | |
if ($Token -eq "") { | |
Write-Host 'PAT not set' | |
exit 1 | |
} | |
$AzureAuthHeader1 = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f "", $Token))) |
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 | |
// inner join of multiple tables | |
"SELECT od.invoiceID, od.jobID, od.invoiceDate, o.datestamp, o.purchaseOrder, od.invoiceLineNumber, od.poLineNumber, od.itemICN, od.itemQuantity, od.itemPrice, od.itemName, od.salesTax, sh.shipToID, sh.company, sh.address1, " | |
. "sh.city, st.stateName, c.countryName, sh.zipCode, sh.email, od.salesTax FROM ordersdetail AS od INNER JOIN orders AS o ON od.jobID = o.jobID INNER JOIN shipTo AS sh ON o.shipToID = sh.shipToID" | |
. " INNER JOIN states AS st ON sh.stateID=st.stateID INNER JOIN countries AS c ON sh.countryID=c.countryID WHERE od.jobID=$jobID AND od.itemICN IN ($itemICNs) AND od.deleted=0 AND o.deleted=0"; | |
// insert statement for adding a user | |
"INSERT INTO users (admintype, username, password ,userEmail, firstName, lastName, active, company1, address1, address2, city, stateID, zip, countryID)" . | |
"VALUES ('$admintype','$username','$password' ,'$userEmail', '$firstName', '$lastName', '$active', '$company1', '$address1', '$address2', '$city', '$stateID |
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 | |
/** | |
* Include and setup custom metabox and fields. | |
* | |
* @category sitetheme | |
* @package Metaboxes | |
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) | |
* @link https://github.com/CMB2/CMB2 | |
*/ |
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 | |
/** | |
* Template Name: All On Demand Webinars | |
* | |
* @package WordPress | |
*/ | |
get_header(); | |
?> | |
<div id="post-type-header"> |
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 | |
/** | |
* Template Name: Custom Webinar Overview Page | |
* | |
* @package WordPress | |
*/ | |
// create an instance of getWebinars class from functions.php | |
$getwebinars = new getWebinars(); | |
// removes 'read more' link from excerpt | |
add_filter( 'the_excerpt', 'custom_remove_read_more' ); |
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( 'wp_print_scripts', 'deactivate_lightbox', 100 ); | |
function deactivate_lightbox() { | |
if ( !is_page_template('template-products-landing.php') && !is_singular( 'product' ) ) { | |
wp_deregister_script( 'hugeit-lightbox-js' ); | |
wp_deregister_script( 'hugeit-custom-js' ); | |
wp_deregister_script( 'hugeit-froogaloop-js' ); | |
wp_deregister_script( 'mousewheel-min-js' ); | |
wp_deregister_script( 'hugeit-colorbox-js' ); | |
} |
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
class getWebinars { | |
function get_featured_webinars(){ | |
// Ensure the global $post variable is in scope | |
global $post; | |
$featuredwebinars = tribe_get_events( | |
array( | |
'eventDisplay' => 'upcoming', | |
'posts_per_page' => 2, | |
'tax_query' => array( |
NewerOlder