Skip to content

Instantly share code, notes, and snippets.

View git-bhanu's full-sized avatar
🐘
Always developing

Bhanu git-bhanu

🐘
Always developing
View GitHub Profile
@bacoords
bacoords / grab_vimeo_thumbnail.php
Last active October 1, 2024 08:59
Grab a thumbnail of a private (but embeddable) Vimeo video
<?php
/**
* Grab the url of a publicly embeddable video hosted on vimeo
* @param str $video_url The "embed" url of a video
* @return str The url of the thumbnail, or false if there's an error
*/
function grab_vimeo_thumbnail($vimeo_url){
if( !$vimeo_url ) return false;
$data = json_decode( file_get_contents( 'http://vimeo.com/api/oembed.json?url=' . $vimeo_url ) );
@codytooker
codytooker / acf-sync-user-and-cpt-bidirectional-relationship.php
Created January 18, 2018 21:27
Modified version of the bidirectional relationship function to help facilitate users to cpt relationships
<?php
/*
* This code is modified from the original here
* https://github.com/Hube2/acf-filters-and-functions/blob/master/acf-reciprocal-relationship.php
*
* Some comments may not be useful anymore since the modifications
*/
@stormwild
stormwild / woocommerce-create-order.md
Last active October 28, 2024 06:17
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@addyosmani
addyosmani / README.md
Last active October 17, 2024 13:41 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@jrfnl
jrfnl / wp-config-debug.php
Last active October 23, 2024 23:23
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*