Skip to content

Instantly share code, notes, and snippets.

View codezz's full-sized avatar
🎯
Focusing

Gabriel F. codezz

🎯
Focusing
View GitHub Profile
@KaineLabs
KaineLabs / yzc_reinstall_privacy_table.php
Created March 30, 2020 23:40
Reinstall Privacy Column
<?php
/**
* Re-install Privacy Column
*/
function yzc_reinstall_privacy_column() {
if ( ! get_option( 'yz_install_bp_activity_privacy2' ) ) {
global $bp, $wpdb;
@hranicka
hranicka / project.docker-compose.yml
Created November 28, 2019 12:29
Traefik & multiple docker-compose projects
version: '3'
services:
nginx:
labels:
- "traefik.enable=true"
- "traefik.http.routers.provys-transformer.rule=Host(`www.example.com`)"
- "traefik.http.routers.provys-transformer.tls=true"
networks:
- traefik
@KaineLabs
KaineLabs / yz-change-posts-and-comments-statistics.php
Last active February 29, 2024 10:29
Change Posts & Comments Statistics to Activities Number & Activities Comments Number
<?php
/**
* Get The User Activities Number.
*/
function yzc_get_user_activities_number( $number, $user_id, $type ) {
if ( $type == 'posts' ) {
global $bp,$wpdb;
$activity_count = $wpdb->get_var( "SELECT COUNT(*) FROM {$bp->activity->table_name}
WHERE component IN ( 'activity', 'groups' ) AND type != 'activity_comment' AND user_id = '$user_id'
@amboutwe
amboutwe / yoast_seo_opengraph_change_image_size.php
Last active October 28, 2024 06:15
Code snippet to change or remove OpenGraph output in Yoast SEO. There are multiple snippets in this code.
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change size for Yoast SEO OpenGraph image for all content
* Credit: Yoast Development team
* Last Tested: May 19 2020 using Yoast SEO 14.1 on WordPress 5.4.1
* Accepts WordPress reserved image size names: 'thumb', 'thumbnail', 'medium', 'large', 'post-thumbnail'
* Accepts custom image size names: https://developer.wordpress.org/reference/functions/add_image_size/
*/
@ibnux
ibnux / video_convert_recursive.php
Last active December 20, 2021 03:26
This script for converting all videos on your NAS, i use this script for converting video on my Synology NAS, This will recursively convert all your video
<?php
/*
Created by @ibnux January 2015
Use with your own risk
This script for converting all videos on your NAS
i use this script for converting video on my Synology NAS
This will recursively convert all your video
put this in your home folder
@vegasje
vegasje / linked-lists-and-iterators.php
Last active November 28, 2018 14:47
Demonstration of a PHP LinkedList, as well as a LinkedListIterator that implements \Iterator.
<?php
class LinkedList {
private $data;
private $next;
private function __construct() {}
public static function fromArray($array) {
$head = new LinkedList();