Skip to content

Instantly share code, notes, and snippets.

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

Kirill Korveld

🏠
Working from home
  • Ukraine
View GitHub Profile
@Korveld
Korveld / Html redirection
Created April 14, 2023 09:13
Html redirection
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url='URL_TO_REDIRECT'" />
<script type="text/javascript">
window.location.href = "URL_TO_REDIRECT"
</script>
</head>
<body>
<p>You will be redirected to URL_TO_REDIRECT soon!</p>
@Korveld
Korveld / index.html
Created March 31, 2023 18:13 — forked from sivadass/index.html
PHP Mailer - Ajax Submission
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ping</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<style>
@Korveld
Korveld / Jquery validate plugin add custom rules
Created March 10, 2023 08:20
Jquery validate plugin add custom rules
$.validator.addMethod('intlTelInput', function (value, element) {
return $(element).intlTelInput("isValidNumber");
}, commonjs_script_env.translate.phone_number);
$.validator.addMethod('emailExt', function(value, element, param) {
return value.match(/^[a-zA-Z0-9_\.%\+\-]+@[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,}$/);
}, commonjs_script_env.translate.email);
@Korveld
Korveld / MySQL shutdown unexpectedly in XAMPP.
Created March 9, 2023 09:27
MySQL shutdown unexpectedly in XAMPP.
1. Rename the folder xampp/mysql/data to xampp/mysql/data_old (you can use any name)
2. Create a new folder xampp/mysql/data
3. Copy the content that resides in xampp/mysql/backup to the new xampp/mysql/data folder
4. Copy all your database folders that are in mysql/data_old to mysql/data (except mysql, performance_schema, and phpmyadmin folders from data_old)
5. Now copy the ibdata1 file from xampp/mysql/data_old and replace it inside xampp/mysql/data folder
6. You can start MySQL again from control panel now
@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
@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 / 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 / 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 / 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 / Wordpress Disable Lazy Load
Created July 24, 2022 06:39
Wordpress Disable Lazy Load
add_filter( 'wp_lazy_loading_enabled', '__return_false' );