Skip to content

Instantly share code, notes, and snippets.

View gettek's full-sized avatar

Sadik Tekin gettek

View GitHub Profile
@manualbashing
manualbashing / blog.md
Last active April 10, 2024 23:20 — forked from joncloud/pr.md
Checkout Azure DevOps Pull Requests locally

Forked from piscisaureus

Fetch and checkout one specific pull request

To identify one particular pull request, find the pull request number on the Azure DevOps site:

image

Then fetch and checkout the pull request in a local branch named pull/137

@almmechanics
almmechanics / AzureDevOpsConditionalPhase.md
Last active April 15, 2019 09:18
Azure DevOps conditional build/release phases

Azure DevOps conditional build/release phases

A Variable can be used to enable/disable elements of build/release pipelines in Azure DevOps. This GIST shows how this can be implemented within a pipeline.

Creating the Variable

Within the Variables tab create a new variable for this toggle, and set this to a suitable default.

The following example creates a variable Deploy.Arm that defaults to false that can be overridden at the creation of the queue.

@almmechanics
almmechanics / AzureDevOpsNaming.md
Last active July 8, 2020 12:11
Azure DevOps Build/Release pipeline naming patterns

Naming Patterns for Azure DevOps Build and Release Pipelines

The following are some 'good' patterns within Azure DevOps to allow visibility within Build and Release pipeline. They are not a replacement for symver but could easily be incorporated to increase visibility.

Current Problem

The defaults for AzureDevOps for naming only refer to the Build number without a context - this makes traceability difficult if you wish to use any of the built in reporting.

Build Pipelines

@woogists
woogists / wc-unhook-remove-emails.php
Last active March 22, 2022 19:09
[General Snippets] Unhook and remove WooCommerce default emails.
/**
* Unhook and remove WooCommerce default emails.
*/
add_action( 'woocommerce_email', 'unhook_those_pesky_emails' );
function unhook_those_pesky_emails( $email_class ) {
/**
* Hooks for sending emails during store events
**/
@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active December 21, 2023 22:55
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@jessepearson
jessepearson / add_bcc_to_certain_emails.php
Created October 31, 2016 17:19
Add a BCC to certain defined emails sent from WooCommerce
<?php // only copy this line if needed
/**
* Function adds a BCC header to emails that match our array
*
* @param string $headers The default headers being used
* @param string $object The email type/object that is being processed
*/
function add_bcc_to_certain_emails( $headers, $object ) {
@n0ts
n0ts / remote_bash.sh
Created May 1, 2014 06:35
execute bash script from remote site
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
bash <(curl -s http://mywebsite.com/myscript.txt)
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl
curl http://foo.com/script.sh | bash -s arg1 arg2
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048