Skip to content

Instantly share code, notes, and snippets.

require 'i18n'
LOCALE = 'ru'
module Jekyll
module I18nFilter
def localize(input, format=nil)
load_translations
format = (format =~ /^:(\w+)/) ? $1.to_sym : format
I18n.l input, :format => format, :locale => LOCALE
ru:
date:
abbr_day_names:
- Вс
- Пн
- Вт
- Ср
- Чт
- Пт
- Сб
@WebiSamurai
WebiSamurai / robots.txt
Created February 5, 2019 12:46
robots-deny-all
User-agent: *
Disallow: /
Axure RP 7.0注册码
用户名:axureuser
序列号:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG
@WebiSamurai
WebiSamurai / setup.md
Created December 22, 2018 09:05 — forked from akella/setup.md
Мой сетап

То что я использую в работе и стримах

Софт для разработки

@WebiSamurai
WebiSamurai / add_option_new_admin_email
Last active July 19, 2018 10:30
Изменение e-mail в настройках администрирования wordpress, добавляется в файл functions.php
remove_action( 'add_option_new_admin_email', 'update_option_new_admin_email' );
remove_action( 'update_option_new_admin_email', 'update_option_new_admin_email' );
/**
* Disable the confirmation notices when an administrator
* changes their email address.
*
* @see http://codex.wordpress.com/Function_Reference/update_option_new_admin_email
*/
function wpdocs_update_option_new_admin_email( $old_value, $value ) {
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
@WebiSamurai
WebiSamurai / url_path.php
Created July 25, 2017 05:24
Absolute path to a folder or a file of a site on a hosting
<?php
echo 'Document root: '.$_SERVER['DOCUMENT_ROOT'].'<br>';
echo 'Полный путь к скрипту и его имя: '.$_SERVER['SCRIPT_FILENAME'].'<br>';
echo 'Имя скрипта: '.$_SERVER['SCRIPT_NAME'];
?>
@WebiSamurai
WebiSamurai / WordPress Development .gitignore
Created July 21, 2017 05:19
.gitignore file for setting up the WordPress development environment.
########################
# Wordpress Core files #
########################
wp-admin/
wp-content/backups/
wp-content/blogs.dir/
wp-content/languages/
wp-content/index.php
wp-content/themes/index.php
wp-includes/
@WebiSamurai
WebiSamurai / JQuery Resize Height.js
Last active October 24, 2017 04:30
Ресайз background под размер окна на всех устройствах
$(document).ready(function() {
function heightDetect() {
$(".main_head").css('height', $(window).height());
};
heightDetect()
$(window).resize(function(){
heightDetect();
});
});