Skip to content

Instantly share code, notes, and snippets.

@ahmetgeymen
ahmetgeymen / bitbucket-pipelines.yml
Last active May 13, 2025 13:27
Bitbucket Pipelines: Build Docker Image + GCR Image Push + GKE Deploy
image: openjdk:11-jdk-slim
definitions:
caches:
gradlewrapper: ~/.gradle/wrapper
gke-kubectl-pipe: &pipe atlassian/google-gke-kubectl-run:1.3.1
gke-kubectl-pipe-variables: &pipe-variables
KEY_FILE: $GKE_API_KEYFILE
PROJECT: $GCP_PROJECT_ID
COMPUTE_ZONE: $GKE_COMPUTE_ZONE
@TimBHowe
TimBHowe / facebook-for-woocommerce-overrides.php
Created January 31, 2018 13:53
Include this file or add this function to the functions.php file to fire the Facebook Pixel 'AddToCart' event on the 'woocommerce_after_cart' action.
<?php
// Add function to fix some for the event tracking issues from the facebook for WooCommerce 1.7.5 update.
add_action( 'woocommerce_init', 'wc_facebook_tracking_fixes' );
function wc_facebook_tracking_fixes(){
// Get the facebook integration class.
$facebook = WooCommerce::instance()->integrations->get_integrations()['facebookcommerce'];
// Add add to cart event tracking to allow for WooCommerce redirect to cart after adding product.
add_action('woocommerce_after_cart', array($facebook->events_tracker, 'inject_add_to_cart_event'));
}
@jakebellacera
jakebellacera / ICS.php
Last active June 21, 2025 01:17
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*