Skip to content

Instantly share code, notes, and snippets.

@ntorgov
ntorgov / custom.js
Created January 16, 2019 11:04
Пропущенная функция
function switchActivate() {
$('.account-check').each(function () {
var $this = $(this),
link = $this.find('.account-check__link'),
link_active = $this.find('.account-check__link.active'),
link_active_width = link_active.outerWidth(),
link_sum_width = 0;
$this.append('<div class="account-check__block"></div>');
var check_block = $('.account-check__block');
check_block.css({'width': link_active_width});
@ntorgov
ntorgov / pattern
Last active January 11, 2019 08:19
Ideolog rule for monolog
^\[([^]]+)] (\S+)\.(\S+):\s*(\[[^]]+])?(.*)$
Groups 1 3 2
@ntorgov
ntorgov / ban.html
Created May 23, 2018 07:36
Random banner
<script>
var totalCount = 4;
var random = Math.floor(Math.random() * totalCount + 1);
switch (random) {
case 2:
document.write('<a rel="nofollow" href="https://www.facebook.com/rinatsladen/" target="_blank"><img class="alignnone" src="http://austria-today.ru/wp-content/uploads/2018/04/Malvina1.jpg" border="0" alt="" width="728" height="200" align="absmiddle" /></a>')
break;
case 3:
document.write('<a rel="nofollow" href="https://www.facebook.com/TatianaBykova.art/media_set?set=a.2188894081335736.1073741837.100006454971258&type=3" target="_blank"><img class="alignnone" src="http://austria-today.ru/wp-content/uploads/2018/04/bykova_tatyana_1.jpg" border="0" alt="" width="728" height="200" align="absmiddle" /></a>')
break;
@ntorgov
ntorgov / detail.ts
Created April 28, 2017 14:11
detail.ts
/// <reference path='../../../typings/index.d.ts' />
/// <reference path='detail.d.ts' />
/// <reference path='../../shared/layout.d.ts' />
/// <reference path='../../../server/classes/material.d.ts' />
/// <reference path='../../../lib/collections/collections.d.ts' />
'use strict';
import {Constants} from '../../../lib/collections/constants';
import {Knifes} from '../../../lib/collections/knifes';
@ntorgov
ntorgov / calculator.ts
Created April 28, 2017 14:08
calculator.ts
/// <reference path='../../typings/index.d.ts' />
/// <reference path='../../server/classes/calculator.d.ts' />
/// <reference path='../../lib/collections/collections.d.ts' />
'use strict';
import {Material} from './material';
import {Constants} from '../../lib/collections/constants';
import {Factors} from '../../lib/collections/factors';
import {Knifes} from '../../lib/collections/knifes';
@ntorgov
ntorgov / .stylelintrc
Last active May 19, 2017 04:51
Proper Stylelint
{
"rules": {
"block-no-empty": null,
"color-no-invalid-hex": true,
"comment-empty-line-before": [
"always",
{
"ignore": [
"stylelint-command",
"after-comment"
@ntorgov
ntorgov / 1.ps1
Created February 11, 2017 15:43
1.ps1
#Main function
Function GetWin10Key
{
$Hklm = 2147483650
$Target = $env:COMPUTERNAME
$regPath = "Software\Microsoft\Windows NT\CurrentVersion"
$DigitalID = "DigitalProductId"
$wmi = [WMIClass]"\\$Target\root\default:stdRegProv"
#Get registry value
$Object = $wmi.GetBinaryValue($hklm,$regPath,$DigitalID)
@ntorgov
ntorgov / .editorconfig
Last active June 22, 2017 13:38
.editorconfig Javascript
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true