Skip to content

Instantly share code, notes, and snippets.


Alex Ilyaev alexilyaev

View GitHub Profile
alexilyaev / Gruntfile.js
Last active Jul 30, 2017
Gruntfile.js - JSHint, Uglify, SASS, Clean, Watch, Connect with LiveReload
View Gruntfile.js
module.exports = function (grunt) {
'use strict';
var port = grunt.option('port') || 9001,
lrPort = grunt.option('lr-port') || 35731,
hostname = 'localhost',
baseFolder = '.';
// Display the elapsed execution time of grunt tasks
alexilyaev /
Last active May 11, 2022
New Mac Guidelines
alexilyaev / test.directive.spec.js
Last active Aug 29, 2015
Simple Angular Directive spec boilerplate
View test.directive.spec.js
describe('test.directive', function () {
'use strict';
var $rootScope;
var $scope;
var $compile;
var preCompiledElement;
var element;
var controller;


Use dash-cased class names

  • It's consistent with CSS property naming convention
.some-class-name {}
alexilyaev /
Last active Aug 29, 2015
Angular Guidelines when using WebPack

No more IIFE

  • WebPack wraps each requireed code with a function, so there's no need to wrap our code with an IIFE
 * Good
  • .ignore
  • BashSupport
  • Css Alphabetical Rearranger
  • GFM
  • Markdown Support
  • Presentation Assistant
alexilyaev /
Created Apr 30, 2017 — forked from cobyism/
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

alexilyaev / .hyper.js
Last active Jul 31, 2017
Hyper.js configuration
View .hyper.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 16,
// font family with optional fallbacks
fontFamily: '"Fira Code", Monaco, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248, 28, 229, 0.8)',
View index.html
<svg width="500" height="300" viewBox="0 0 500 300">
<!-- Define components -->
<g id="tape">
<rect width="450" height="200" fill="#222"
stroke="#aaa" stroke-width="5"/>
<g id="wheel">
<circle cx="50" cy="50" r="50"
View canvas-ping-pong.markdown