Skip to content

Instantly share code, notes, and snippets.

View Kamilius's full-sized avatar

Oleksandr Hutsulyak Kamilius

View GitHub Profile
@Kamilius
Kamilius / window-props-stub.js
Last active July 12, 2022 10:02
Stub window properties for Jasmine unit tests
describe('', () => {
let originalPluginReference;
let globalPluginStub;
beforeAll(() => {
// Backing up original property reference, so we could restore it
// after all tests being performed
originalPluginReference = window['GlobalPlugin'];
});
{
"name": "tourist-club",
"version": "0.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@agm/core": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/@agm/core/-/core-1.0.0-beta.2.tgz",
"integrity": "sha512-3bdfvkWDmJszpj/F6Fzgv7sks0cs/cUEQPfs37tcJFz3jc62SsXy4TGb/WJT8FpH2nSGE6DonP8lXuFxB0lblQ=="
/* eslint no-var: 0 */
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var StyleLintPlugin = require('stylelint-webpack-plugin');
@Kamilius
Kamilius / webpack.config.js
Created August 3, 2016 15:42 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@Kamilius
Kamilius / find-unused-sass-variables.sh
Created May 31, 2016 07:24 — forked from badsyntax/find-unused-sass-variables.sh
Find unused SCSS variables. Usage: `./find-unused-sass-variables.sh sassDir/`
#!/usr/bin/env bash
#
# Approach:
# 1. Find variable declaration in the form of "$my-var: anyvalue"
# 2. Loop through found variables and find occurrences of each variable in all sass files
# 3. Filter out vars that occurred only once
if [ -z "$1" ]; then
echo "Please specify a directory as the first argument."
exit 1
@Kamilius
Kamilius / snippets.cson
Last active October 9, 2015 08:15
Snippet for Atom.io text editor's "react" package
# Snippet for ReactJS ES6 component template
'.source.js.jsx':
'React component template':
'prefix': 'comptempl'
'body': """
import React from 'react'
export default class ${1} extends React.Component {
constructor(props) {
super(props)