Skip to content

Instantly share code, notes, and snippets.

View Korveld's full-sized avatar

Kirill Titov Korveld

View GitHub Profile
@Korveld
Korveld / yoast_seo_canonical_change_woocom_shop.php
Created February 28, 2022 13:35 — forked from amboutwe/yoast_seo_canonical_change_woocom_shop.php
Code snippets for the Yoast SEO canonical output
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change the canonical link for the shop page
* Credit: Scott Weiss of somethumb.com
* Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1
*/
function yoast_seo_canonical_change_woocom_shop( $canonical ) {
if ( !is_shop() ) {
@Korveld
Korveld / Wordpress redirection get all urls except a couple
Created July 8, 2022 12:20
Wordpress redirection get all urls except a couple
^/lt/blog/(?!some-slug-one|some-slug-two)(.*)
@Korveld
Korveld / check data type of any variable in jQuery
Created July 9, 2022 08:52
check data type of any variable in jQuery
JQuery.type(object);
@Korveld
Korveld / resize-event.vue
Created July 19, 2022 18:57 — forked from ansidev/resize-event.vue
Handle resize event in Nuxt JS
<script>
export default {
mounted: function () {
this.$nextTick(function () {
this.onResize();
})
window.addEventListener('resize', this.onResize)
},
methods: {
onResize() {
@Korveld
Korveld / Wordpress Disable Lazy Load
Created July 24, 2022 06:39
Wordpress Disable Lazy Load
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
@Korveld
Korveld / gulpfile.js
Created August 5, 2022 06:34 — forked from BaronVonPerko/gulpfile.js
Gulpfile for SCSS and Tailwind
var gulp = require('gulp');
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
gulp.task('style', function () {
var tailwindcss = require('tailwindcss');
return gulp.src('sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(postcss([
@Korveld
Korveld / Import an SQL file using the command line in MySQL
Last active February 29, 2024 18:28
Import an SQL file using the command line in MySQL
mysql -u [DATABASE USER] -p [DATABASE NAME] < [PATH TO SQL FILE]
example
mysql -u root -p db_name < "C:/xampp/htdocs/db_file.sql"
MAMP
/applications/MAMP/library/bin/mysql -u user_name -p database_name < /Applications/MAMP/htdocs/database_name.sql
MySQL command line
@Korveld
Korveld / wp_security_setting
Created February 13, 2023 20:22 — forked from artikus11/wp_security_setting
Настройки для плагина All In One WP Security
{"aiowps_enable_debug":"1","aiowps_remove_wp_generator_meta_info":"1","aiowps_prevent_hotlinking":"1","aiowps_enable_login_lockdown":"1","aiowps_allow_unlock_requests":"","aiowps_max_login_attempts":3,"aiowps_retry_time_period":5,"aiowps_lockout_time_length":60,"aiowps_set_generic_login_msg":"","aiowps_enable_email_notify":"","aiowps_email_address":"info@wp.com","aiowps_enable_forced_logout":"","aiowps_logout_time_period":"60","aiowps_enable_invalid_username_lockdown":"","aiowps_instantly_lockout_specific_usernames":[],"aiowps_unlock_request_secret_key":"jt1dsnktfg9u67hi14b2","aiowps_lockdown_enable_whitelisting":"","aiowps_lockdown_allowed_ip_addresses":"176.99.12.40","aiowps_enable_whitelisting":"","aiowps_allowed_ip_addresses":"","aiowps_enable_login_captcha":"","aiowps_enable_custom_login_captcha":"","aiowps_enable_woo_login_captcha":"","aiowps_enable_woo_register_captcha":"","aiowps_captcha_secret_key":"sc2se0fbuzrcku9ol9bh","aiowps_enable_manual_registration_approval":"","aiowps_enable_registration_page
@Korveld
Korveld / Outlook email btn html code
Last active February 14, 2023 10:50
Outlook email btn html code
<div style="margin-bottom: 24px; text-align: center;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<!--[if mso]>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" style="border-spacing:0;border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<tr>
<td align="center">
<a:roundrect xmlns:a="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="#" fillcolor="#1F1F20" arcsize="8%" style="v-text-anchor:middle;width:183.75pt;height:32pt;" stroke="f"><w:anchorlock/>
@Korveld
Korveld / Setup git remote
Created February 15, 2023 16:14
Setup git remote
git init .
git remote add origin git@github.com:user/repo.git
git fetch origin
git checkout master