Skip to content

Instantly share code, notes, and snippets.

View impankratov's full-sized avatar
🎯
Focusing

Ivan Pankratov impankratov

🎯
Focusing
View GitHub Profile
@impankratov
impankratov / _bootstrap-breakpoint-xl.sass
Last active May 27, 2016 18:21
This gist adds XL breakpoint to Bootstrap-sass ...in sass flavour.
// This gist adds XL breakpoint to Bootstrap-sass ...in sass flavour.
// based on the idea from
// https://spin.atomicobject.com/2015/03/06/bootstrap-add-xl-grid-size-option/
// SETTINGS
$xl-width: 1400px
// variables.scss
// Extra large screen / Extra wide desktop
@impankratov
impankratov / _bootstrap-responsive-media-mixins.sass
Last active May 31, 2016 18:14
Sass mixins for easy media queries based on bootstrap breakpoint system.
// XS
=media-xs-max
@media screen and (max-width: $screen-xs-max)
@content
// SM
=media-sm-min
@media screen and (min-width: $screen-sm-min)
@content
=media-sm-max
@impankratov
impankratov / bitrix-symbol-codes-generator.php
Last active October 24, 2016 21:09
Generates symbol codes for the elements & sections of a chosen infoblock
<?php
require $_SERVER['DOCUMENT_ROOT'].'/bitrix/header.php';
//генерация символьных кодов в битриксе
//https://dev.1c-bitrix.ru/community/webdev/user/30522/blog/6794/ - оригинальная статья
if(!CModule::IncludeModule("iblock")) {
echo "Error with iblock module!";
die;
}
Get-ChildItem -Filter "*.sass" -Recurse | Rename-Item -NewName {'_' + $_.name -replace '\.sass','.scss' }
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://unpkg.com/@reactivex/rxjs@5.0.3/dist/global/Rx.js"></script>
<script src="http://cdn.jsdelivr.net/rsvp/3.0.6/rsvp.js"></script>
@impankratov
impankratov / docker-compose.yml
Created March 22, 2017 11:21
docker-compose: REDIS + NodeJS + NGiNX for local dev
version: '2'
services:
db:
image: redis
volumes:
- db_data:/data
backend:
depends_on:

Keybase proof

I hereby claim:

  • I am impankratov on github.
  • I am impankratov (https://keybase.io/impankratov) on keybase.
  • I have a public key ASBOedm4_VHzGY4md8AD66hMgtcO6A8mDfMPstKfzixjWgo

To claim this, I am signing this object:

@impankratov
impankratov / webpack.js
Created July 2, 2017 19:30
webpack-bundle-analyzer plugin config
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
new BundleAnalyzerPlugin({
openAnalyzer: true,
generateStatsFile: true,
statsFilename: 'stats.json',
}),
@impankratov
impankratov / jest-group-expects-reuse.spec.ts
Created December 4, 2017 13:04
Test shared expect calls across the test suite with jest
const testGroupOfExpects = target => {
expect(!!target).toBe(true);
expect(target).toContain(1);
};
describe('grouping', () => {
it('should do smth', () => {
const target = [1, 2];
testGroupOfExpects(target);
@impankratov
impankratov / dev-server.ts
Last active January 21, 2018 16:51
Execute shell commands on every webpack build/update. Alternative way of using the webpack-shell-plugin.
import { ChildProcess, spawn } from 'child_process';
import { resolve } from 'path';
import * as webpack from 'webpack';
import config from './webpack.config';
const devConfig = config();
const compiler = webpack(devConfig);