Skip to content

Instantly share code, notes, and snippets.

View georgejipa's full-sized avatar
🎯
Focusing

George Jipa georgejipa

🎯
Focusing
View GitHub Profile
@georgejipa
georgejipa / better-git-branch.sh
Created April 20, 2024 01:49 — forked from schacon/better-git-branch.sh
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@georgejipa
georgejipa / 5ec339ed59c37.html
Created November 13, 2023 15:07 — forked from owenconti/5ec339ed59c37.html
Moving our search drop down from Algolia to Alpine.js
<div class="relative">
<div id="#search-box"></div>
<div id="#hits"></div>
</div>
@georgejipa
georgejipa / EnhancedEnum.php
Created September 20, 2022 05:13 — forked from aneesdev/EnhancedEnum.php
EnhancedEnum PHP trait
<?php
trait EnhancedEnum
{
/**
* Get the enum value from the name. e.g case INVOICE = 'invoice'; will return 'invoice'
*
* @param string $name
* @return static
*/
@georgejipa
georgejipa / enqueue.php
Created July 25, 2017 08:26
shortcode embed static assets
function enqueue_assets() {
if (!is_singular()) {
return;
}
$content = get_post_field('post_content', get_the_ID());
if (!has_shortcode($content, 'shortcode_name_here')) {
return;
}
<?php
add_action('wp_head', 'webworks_facebook_analytics');
function webworks_facebook_analytics() {
if(current_user_can('manage_options')) {
return;
}
?>
@georgejipa
georgejipa / array_insert.php
Created October 1, 2016 18:08 — forked from riskiii/array_insert.php
array_insert()
<?php
/**
* Insert an array into another array before/after a certain key
*
* @param array $array The initial array
* @param array $pairs The array to insert
* @param string $key The certain key
* @param string $position Wether to insert the array before or after the key
* @return array
@georgejipa
georgejipa / changelog.sh
Created June 25, 2016 05:36 — forked from kingkool68/changelog.sh
Bash script to generate a markdown change log of GitHub pull requests between tagged releases
#!/bin/bash
# Generate a Markdown change log of pull requests from commits between two tags
# Author: Russell Heimlich
# URL: https://gist.github.com/kingkool68/09a201a35c83e43af08fcbacee5c315a
# HOW TO USE
# Copy this script to a directory under Git version control
# Make the script executable i.e. chmod +x changelog.sh
# Run it! ./changelog.sh
# Check CHANGELOG.md to see your results
<?php
/*
Plugin Name: WooCommerce New Fields
Plugin URI: https://georgejipa.com/
Description: Add new billing fields
Version: 1.0
Author: George Jipa
Author URI: http://georgejipa.com
*/
@georgejipa
georgejipa / php7.sh
Created December 4, 2015 11:39
PHP 7.0.0 (release) on Debian 8
#!/bin/bash
set -e
PHP_VERSION=7.0.0
# Dependencies
apt-get update
apt-get install -y \