Skip to content

Instantly share code, notes, and snippets.

View crazyyy's full-sized avatar

Vitalii Antoniuk crazyyy

View GitHub Profile
@kingkool68
kingkool68 / examples.php
Created June 23, 2022 20:45
Helper functions to make generating WordPress post type labels and taxonomy labels easier
<?php
// Register a Book post type
$args = array(
'labels' => generate_post_type_labels( 'book', 'books' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
@Ruzgfpegk
Ruzgfpegk / wp-gutenblock.md
Created March 12, 2021 08:27
WordPress: Migrating to Gutenberg (WIP)

WordPress: Migrating to Gutenberg (WIP)

Introduction

One of the tasks that will happen more and more with time will be to convert existing WordPress websites that are based on third-party builders (Elementor, Divi, ...) to the new native builder of WordPress: Gutenberg.

The benefits are cost (if you paid for a full license of a builder), support (you won't risk compatibility issues by updating WordPress) and performance (most if not all contents of the pages are computed once on-save, instead as once on every load as with builders).

However, the switch is not easy at all from a developer perspective. The user experience can also be way worse, and some blocks required for the conversion may not exist.

@nginx-gists
nginx-gists / ubuntu_install.sh
Last active March 17, 2025 15:16
Automating Installation of WordPress with NGINX Unit on Ubuntu
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ];then
>&2 echo "This script requires root level access to run"
exit 1
fi
if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then
>&2 echo "WORDPRESS_DB_PASSWORD must be set"
>&2 echo "Here is a random one that you can paste:"
@VirtuBox
VirtuBox / nextcloud.conf
Created July 15, 2020 13:52
wordops nextcloud
# WordOps nextcloud configuration
# install path : /var/www/yourdomain.tld/conf/nginx/nextcloud.conf
# replace "fastcgi_pass php73;" with another upstream if you are using php72 or php74
# ----------------------------------------------------------------------------
add_header X-Robots-Tag none;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy no-referrer;
location = /robots.txt {
allow all;
@Ruzgfpegk
Ruzgfpegk / wp-perf.md
Last active April 9, 2025 09:04
WordPress Performance & Development tips
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active March 29, 2025 12:18
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@ww9
ww9 / one-line-text-art-and-emojis_utf8_ascii.txt
Last active March 26, 2025 11:47
Emojis, UTF8, ASCII (one line) #misc
# Collection of one line text art (◕‿◕✿)
Collection of emojis and one line text art like (╯°□°)╯︵ ┻━┻ 🤗
ּבּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
@ricardojba
ricardojba / windows_hardening.cmd
Last active April 23, 2025 10:35
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,
@harryfinn
harryfinn / letsencrypt-wordpress-setup.md
Last active November 12, 2023 10:21
Instructions on how to setup a Letsencrypt SSL certificate on a WordPress site

Letsencrypt (for WordPress sites)

Note: This setup assumes you are running Ubuntu 16.04 OS with Apache 2.4.23, older versions of Ubuntu (i.e. 14.04) require minor configuration changes in order for this setup to work.

Setup

Follow the install instructions for certbot (letsencrypt's SSL manager) on https://certbot.eff.org/, making sure to select the correct server OS version.

Note: You only need to complete the Install section, then return to this README in order to setup your SSL

@ofurkusi
ofurkusi / UDL_TodoTxt.xml
Created October 14, 2016 14:27
Todo.txt syntax highlighting for Notepad++
<NotepadPlus>
<UserLang name="Todo.txt" ext="Todo.txt" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00x 01 02((EOL)) 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>