Skip to content

Instantly share code, notes, and snippets.

View moskalukigor's full-sized avatar

Ihor moskalukigor

View GitHub Profile
@vovadocent
vovadocent / getTaxTermsByOtherTaxTerm.php
Last active August 15, 2024 23:28
Get Taxonomy Terms By Other Taxonomy Term
<?php
function getTaxTermsByOtherTaxTerm($taxonomy_args, $out_taxonomy, $post_type = NULL) {
global $wpdb;
$tax_q = $taxonomy_ids = array();
$post_type_q = !empty($post_type_q) ? "AND p.post_type = '$post_type'" : "";
foreach ($taxonomy_args as $tax => $term_id) {
$sql = "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt
INNER JOIN $wpdb->term_taxonomy t ON (t.term_id = tt.term_id AND tt.taxonomy = '$tax' AND t.term_id = $term_id)";
$taxonomy_ids = array_merge( $taxonomy_ids, $wpdb->get_col($sql) );
@Keey
Keey / readme.txt
Last active March 18, 2019 10:06
optimize
0. Якшо сайт не наш - зробити скрін показників перед оптимізацією.
1. оптимізуєш картитнки ті які каже гугл.
2. ставиш плагін wp-fastest-cache(https://goo.gl/aRfrvR)
3. включаєш і провіряєш чи працює сайт.
4. ставиш і активуєш wp-fastest-cache-premium(https://drive.google.com/open?id=12Pe-Bf4kFvsIvx_mVpvEfMcfZ8KOZaSS) з архіву.
5. заходиш в налаштування плагіну і доставляєш всі галочки.
6. чистиш кеш в адмін барі в горі.
7. провіряєш чи працює сайт.
8. дивишся результати в гуглі.
9. якщо сайт не працює відключаєш всі галочки попорядку поки не запрацює(після кожної галочки незабувай чистити кеш).

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@maciejbis
maciejbis / permalink-manager-qtranslatext.php
Last active September 22, 2023 21:00
Permalink Manager & qTranslate-XT support
@danielwetan
danielwetan / nodejs-cicd-github-actions.md
Last active July 17, 2025 21:58
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@SizableShrimp
SizableShrimp / README.md
Last active June 30, 2025 17:16
How to setup shading with Minecraft Forge

How to setup shading with Minecraft Forge

Shading is the concept of packing external dependencies inside your jar so that they exist in production. Without this, using external libraries would produce ClassNotFoundExceptions when you run your mod jar outside of an IDE. This guide explains how to setup shading through Gradle.

Assumptions

This guide assumes that:

  • You are on ForgeGradle 5 or higher
  • You are on Gradle 7.0 or higher