Skip to content

Instantly share code, notes, and snippets.

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

Kirill Korveld

🏠
Working from home
View GitHub Profile
@Korveld
Korveld / nodejs-gulp-install.txt
Created December 19, 2018 16:33 — forked from agragregra/nodejs-gulp-install.txt
Node.js + Gulp installation (Ubuntu) one line command
1. Simple (Node.js LTS, Gulp, rimraf, NCU):
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
2. Advanced (Node.js LTS, Gulp, rimraf, NCU, Ruby, Jekyll, Jekyll paginate)
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo gem i jekyll; sudo gem i jekyll-paginate-v2; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
3. Длинна командной строки (добавить PROMPT_DIRTRIM=3 в конец и сохранить файл):
sudo nano ~/.bashrc
PROMPT_DIRTRIM=3
@Korveld
Korveld / Add_Open_Bash_context_menu.reg
Created December 19, 2018 16:38
Добавление пункта "Открыть окно Bash здесь" для работы с Ubuntu shell в текущей папке Windows 10
Windows Registry Editor Version 5.00
; Created by:Shawn Brink
; Created on: August 13th 2016
; Tutorial: http://www.tenforums.com/tutorials/60125-open-bash-window-here-context-menu-add-windows-10-a.html
[HKEY_CLASSES_ROOT\Directory\Background\shell\Bash]
@="Открыть окно Bash здесь"
@Korveld
Korveld / README.md
Created October 15, 2019 14:57 — forked from marekyggdrasil/README.md
How to fix Ruby TLS support

OSX Sierra version 10.12.6

if you are getting error like

ERROR:  Could not find a valid gem '<some package name>' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur

test your TLS v1.2 support

@Korveld
Korveld / slick js only on mobile
Last active March 2, 2021 19:50 — forked from ndunk28/slick-on-mobile.js
slick js only on mobile
var slick_slider = $('.latest-topics')
var settings_slider = {
infinite: false,
autoplay: false,
dots: false,
arrows: false,
slidesToShow: 1,
slidesToScroll: 1,
cssEase: 'ease',
speed: 300,
@Korveld
Korveld / yoast_seo_opengraph_change_image_size.php
Created November 27, 2019 11:34 — forked from amboutwe/yoast_seo_opengraph_change_image_size.php
Code snippet to change or remove OpenGraph output in Yoast SEO. There are multiple snippets in this code.
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change size for Yoast SEO OpenGraph image for all content
* Credit: Yoast Development team
* Last Tested: May 24 2019 using Yoast SEO 11.2.1 on WordPress 5.2.1
*/
add_filter( 'wpseo_opengraph_image_size', 'yoast_seo_opengraph_change_image_size' );
function yoast_seo_opengraph_change_image_size( $string ) {
@Korveld
Korveld / tw_remove_menu_pages.php
Created April 11, 2020 12:02 — forked from michael-cannon/tw_remove_menu_pages.php
Remove custom post type submenu pages.
<?php
function tw_remove_menu_pages() {
// remove testimonials menu section
// remove_menu_page( 'edit.php?post_type=testimonials-widget' );
// remove categories
remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'edit-tags.php?taxonomy=category&amp;post_type=testimonials-widget' );
// remove tags
@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 / 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 / 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 / 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