Skip to content

Instantly share code, notes, and snippets.

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

termitkin

🏠
Working from home
  • Russia, Moscow
View GitHub Profile
@termitkin
termitkin / docker-compose.yml
Last active August 20, 2021 08:52
docker-compose файл для запуска tinkoff-invest
version: "3"
services:
frontend:
image: termitkin/tinkoff-invest-frontend
restart: unless-stopped
ports:
- 3500:5000
depends_on:
- backend
#bundle-office .review,#mount,.app,.page{min-width:0}#bundle-office .review-footer{flex-wrap:wrap;gap:10px;padding:20px 15px;justify-content:center}#bundle-office .review-footer *{margin:0}@media screen and (max-width:600px){#bundle-office .review-header{padding:60px 15px 40px;flex-direction:column;gap:10px}#bundle-office .review_type_common .review__tabs{padding:0 15px}#bundle-office .review-footer__file-input,#bundle-office .review-footer__space{position:absolute}.revisor-brief-comment{padding:15px}.revisor-brief-comment__action-buttons,.revisor-brief-comment__reviewer-info-wrapper{flex-wrap:wrap;gap:10px;justify-content:center!important}.revisor-brief-comment__expand-button{margin:0}.revisor-reviewer-info{flex-wrap:wrap;gap:10px;justify-content:center!important}.review-header__actions,.review-header__author-avatar,.review-header__info{margin:0!important}}
.hljs{display:block;overflow-x:auto;padding:.5em;color:#fff}.hljs-subst,.hljs.css .hljs-built_in,.hljs.html .javascript .hljs-built_in,.hljs.html .javasc
@termitkin
termitkin / cut-corners-with-border.css
Created September 28, 2019 15:14
[CSS] Cut corners with border
.wrap {
display: inline-block;
padding: 20px;
background-color: SeaGreen;
}
.elem {
width: 300px;
position: relative;
border-radius: 10px;
/*
If you need IE11 – use .woff and .woff2
In other cases, you can only use .woff2
*/
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
@termitkin
termitkin / visually-hidden.css
Created September 22, 2019 11:39
[CSS] Visually hidden
.visually-hidden {
position: absolute;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
margin: -1px;
padding: 0;
border: 0;
}
@termitkin
termitkin / functions.php
Created September 16, 2019 14:25
[WordPress] Comment date to format %count_days% ago
function pressfore_comment_time_output($date, $d, $comment){
return sprintf( _x('%s ago', '%s = human-readable time difference'), human_time_diff(get_comment_time('U'), current_time('timestamp')));
}
add_filter('get_comment_date', 'pressfore_comment_time_output', 10, 3);
@termitkin
termitkin / functions.php
Created September 16, 2019 13:21
[WordPress] Allow to upload .rar files
function allow_upload_rar ($mime_types = array()) {
$mime_types['rar'] = 'application/x-rar';
return $mime_types;
}
add_filter('upload_mimes', 'allow_upload_rar');
@termitkin
termitkin / functions.php
Created September 16, 2019 13:16
[WordPress] Add link rel="canonical" to <head>
if (function_exists('rel_canonical')) {
remove_action('wp_head', 'rel_canonical');
}
function add_rel_canonical() {
if (!is_singular())
return;
global $wp_the_query;
if (!$id = $wp_the_query->get_queried_object_id())
return;
@termitkin
termitkin / functions.php
Created September 16, 2019 13:09
[WordPress] Remove website and email fields from comments form
function website_and_email_remove($fields) {
if(isset($fields['url'])) {
unset($fields['url']);
}
if (isset($fields['email'])) {
unset($fields['email']);
}
return $fields;
}
add_filter('comment_form_default_fields', 'website_and_email_remove');
@termitkin
termitkin / functions.php
Last active September 16, 2019 13:06
[WordPress] Move comment field to bottom of add comments form
function move_comment_field_to_bottom($fields) {
$comment_field = $fields['comment'];
unset( $fields['comment'] );
$fields['comment'] = $comment_field;
return $fields;
}
add_filter('comment_form_fields', 'move_comment_field_to_bottom');