Skip to content

Instantly share code, notes, and snippets.

View joviczarko's full-sized avatar
🎯
Focusing

Jović Žarko joviczarko

🎯
Focusing
View GitHub Profile
@ollietreend
ollietreend / acf-php-to-json.php
Last active April 22, 2024 11:12
Convert Advanced Custom Fields Pro configuration from PHP to JSON.
<?php
/**
* Plugin Name: Convert ACF PHP to JSON
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON.
*/
namespace ConvertAcfPhpToJson;
/**
* Add submenu item under 'Custom Fields'
@Creativenauts
Creativenauts / edd-download-grid-loop.php
Created April 2, 2016 05:22
Easy Digital Downloads - Download Grid Loop Function
function get_edd_posts($per_page, $order, $category = '', $exclude_category = '') {
$exclude_categories = explode(',', $exclude_category);
$product_args = array(
'tax_query' => array (
array(
'taxonomy' => 'download_category', // Download Category
'terms' => $exclude_categories, // Download Category Exclusions
'field' => 'slug', // Term Slug
@akhilmekkatt
akhilmekkatt / Hash change of Bootstrap Tabs
Last active March 4, 2022 05:49
Hash change of Bootstrap Tab
Hash change of Bootstrap Tab
----------------------------
customized bootstrap tab component. here hash address will be changing on clicking on the tabs. and when ever copy this changed address to a browser url address accordingly it will show corresponding content in tabs
@timersys
timersys / script.js
Last active May 28, 2020 21:06
Simple Content locker Plugin
jQuery( document ).ready(function(){
FB.Event.subscribe( 'edge.create', function( href ) {
createCookie('wptuts-lock_'+wptuts_content_locker.ID,true,9999);
location.reload(); //if you use cache maybe you want to add a ?nocache=true to this url
});
});
function createCookie( name, value, days ) {
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1