Skip to content

Instantly share code, notes, and snippets.

View piotroq's full-sized avatar
😀
Focusing

Piotr Bartosik piotroq

😀
Focusing
View GitHub Profile
@piotroq
piotroq / meta-tags.md
Created October 10, 2025 06:59 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@piotroq
piotroq / meta-tags.md
Created October 10, 2025 06:58 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@piotroq
piotroq / Enable-OpenSSH-Client-Server-On-Windows.md
Created October 9, 2025 22:55 — forked from bityob/Enable-OpenSSH-Client-Server-On-Windows.md
Enable SSH Client/Server with OpenSSH on Windows

How to enable ssh on Windows?

Tested on Windows Version 10.0.17755.1

  • Run cmd as admin

  • Install OpenSSH.Client - dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0

C:\WINDOWS\system32&gt;dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0
@piotroq
piotroq / rarreg.key
Created October 9, 2025 22:37 — forked from MuhammadSaim/rarreg.key
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
@piotroq
piotroq / duplicate post.php
Created December 12, 2024 12:33
Duplicate post wordpress.php
/*
* This code duplicates a WordPress page. The duplicate page will appear as a draft and the user will be redirected to the edit screen.
*/
function rd_duplicate_post_as_draft(){
global $wpdb;
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) {
wp_die('No post to duplicate has been supplied!');
}
if ( !isset( $_GET['duplicate_nonce'] ) || !wp_verify_nonce( $_GET['duplicate_nonce'], basename( __FILE__ ) ) )
return;
@piotroq
piotroq / duplicate post.php
Created December 12, 2024 12:33
Duplicate post wordpress.php
/*
* This code duplicates a WordPress page. The duplicate page will appear as a draft and the user will be redirected to the edit screen.
*/
function rd_duplicate_post_as_draft(){
global $wpdb;
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) {
wp_die('No post to duplicate has been supplied!');
}
if ( !isset( $_GET['duplicate_nonce'] ) || !wp_verify_nonce( $_GET['duplicate_nonce'], basename( __FILE__ ) ) )
return;
@piotroq
piotroq / Chat GPT speed up Wordpress.php
Created November 26, 2024 13:48
Chat GPT speed up Wordpress
// Wyłącz emojis
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
// Wyłącz pingbacks i trackbacks
add_filter('xmlrpc_enabled', '__return_false');
remove_action('do_pings', 'do_all_pings', 10);
// Usuń wersję WordPress z nagłówka
remove_action('wp_head', 'wp_generator');
@piotroq
piotroq / Custom Avatar Without a Plugin.php
Created November 25, 2024 09:55
Custom Avatar Without a Plugin.php
/**
* Custom Avatar Without a Plugin
*/
// 1. Enqueue the needed scripts.
add_action( "admin_enqueue_scripts", "ayecode_enqueue" );
function ayecode_enqueue( $hook ){
// Load scripts only on the profile page.
if( $hook === 'profile.php' || $hook === 'user-edit.php' ){
add_thickbox();
wp_enqueue_script( 'media-upload' );
@piotroq
piotroq / Add custom status to post display wordpress.php
Created November 25, 2024 00:44
Add custom status to post display.php
// Add custom status to post display.
function rudr_custom_status_creation(){
register_post_status( 'featured', array(
'label' => _x( 'Do publikacji', 'post' ), // I used only minimum of parameters
'label_count' => _n_noop( 'Do publikacji <span class="count">(%s)</span>', 'Do publikacji <span class="count">(%s)</span>'),
'public' => false
));
}
add_action( 'init', 'rudr_custom_status_creation' );
@piotroq
piotroq / Filter user panel wp admin add date registration.php
Created November 25, 2024 00:21
Filter user panel wp admin add date registration.php
/*
* Creating a column (it is also possible to remove some default ones)
*/
add_filter( 'manage_users_columns', 'rudr_modify_user_table' );
function rudr_modify_user_table( $columns ) {
// unset( $columns['posts'] ); // maybe you would like to remove default columns
$columns[ 'registration_date' ] = 'Data rejestracji'; // add new
return $columns;