Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Kirill Korveld

🏠
Working from home
Block or report user

Report or block Korveld

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Korveld
Korveld / slick-on-mobile.js
Last active Oct 18, 2019 — forked from ndunk28/slick-on-mobile.js
slick js only on mobile
View slick-on-mobile.js
// slider
$slick_slider = $('.slider');
settings_slider = {
dots: false,
arrows: false
// more settings
}
slick_on_mobile( $slick_slider, settings_slider);
// slick on mobile
@Korveld
Korveld / README.md
Created Oct 15, 2019 — forked from marekyggdrasil/README.md
How to fix Ruby TLS support
View README.md

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

View jQuery scroll to element
$("a[href^='#']").on("click", function(e) {
e.preventDefault();
$("html, body").animate({
scrollTop: $($(this).attr("href")).offset().top
}, 1000);
});
if ($(window.location.hash).length > 1) {
$("html, body").animate({
scrollTop: $(window.location.hash).offset().top
View reorder_wp_backend_menu.php
function wpse_custom_menu_order( $menu_ord ) {
if ( !$menu_ord ) return true;
return array(
'index.php', // Dashboard
'separator1', // First separator
'edit.php', // Posts
'upload.php', // Media
'link-manager.php', // Links
'edit-comments.php', // Comments
View disable_addNew_custom_post_type.php
function disable_new_posts() {
// Hide sidebar link
global $submenu;
unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]);
// Hide link on listing page
if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') {
echo '<style type="text/css">
.page-title-action { display:none; }
</style>';
@Korveld
Korveld / Add_Open_Bash_context_menu.reg
Created Dec 19, 2018
Добавление пункта "Открыть окно Bash здесь" для работы с Ubuntu shell в текущей папке Windows 10
View Add_Open_Bash_context_menu.reg
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 / nodejs-gulp-install.txt
Created Dec 19, 2018 — forked from agragregra/nodejs-gulp-install.txt
Node.js + Gulp installation (Ubuntu) one line command
View nodejs-gulp-install.txt
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
View Style the first word
$('p').each(function() {
var word = $(this).html();
var index = word.indexOf(' ');
if(index == -1) {
index = word.length;
}
$(this).html('<span class="first-word">' + word.substring(0, index) + '</span>' + word.substring(index, word.length));
});
View Datepicker
aHR0cDovL3d3dy55b3Vwb3JuLmNvbS93YXRjaC8xMDM3NzcyMy9ob3QtZ2VybWFuLXRlZW4tYmFiZS1nZXRzLWZ1Y2tlZC1ob3QvP2Zyb209Y2F0ZWc=
aHR0cHM6Ly93d3cueW91cG9ybi5jb20vd2F0Y2gvMTI1OTM1MDcvdGVlbnktbG92ZXJzLWhpcy1nZi1mdWNrcy1saWtlLWEtY291cnRlc2FuLw==
aHR0cDovL3d3dy55b3Vwb3JuLmNvbS93YXRjaC8xMDE4NjMzMy9lcm90aWNheC1hLXZpZXctdG8tZm9yZXZlci8/ZnJvbT1yZWxhdGVkMyZhbD0yJmZyb21faWQ9MTAxODYzMzMmcG9zPTEx
aHR0cDovL3d3dy5wb3JuaHViLmNvbS92aWV3X3ZpZGVvLnBocD92aWV3a2V5PXBoNTY5NWU4N2M5OTlmZA==
aHR0cDovL3d3dy5wb3JuaHViLmNvbS92aWV3X3ZpZGVvLnBocD92aWV3a2V5PXBoNTY3NWU0MDVhMTE0NQ==
aHR0cDovL3d3dy5yZWR0dWJlLmNvbS81NTA0ODM=
aHR0cDovL3d3dy5wb3JuaHViLmNvbS92aWV3X3ZpZGVvLnBocD92aWV3a2V5PXBoNTU5MmY1OTUxZTU3ZA0KaHR0cDovL3d3dy5yZWR0dWJlLmNvbS8xNjAyNTQ=
anRvbTcwNzFAZ21haWwuY29tDQpkQmx0bm0xMw==
You can’t perform that action at this time.