This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info it worked if it ends with ok | |
verbose cli [ 'node', '/usr/local/bin/npm', 'install', '-g', 'nodo' ] | |
info using [email protected] | |
info using [email protected] | |
verbose config file /Users/tenphi/.npmrc | |
verbose config file /usr/local/etc/npmrc | |
verbose config file /usr/local/lib/node_modules/npm/npmrc | |
verbose cache add [ 'nodo', null ] | |
silly cache add: name, spec, args [ undefined, 'nodo', [ 'nodo', null ] ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function css( element, property ) { | |
return window.getComputedStyle( element, null ).getPropertyValue( property ) || ''; | |
} | |
$('*').each(function(i, el) { | |
if (~css(el, 'font-family').indexOf('Arial')) { | |
$(el).css('outline', '1px solid red'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install dependecies | |
brew install imagemagick jpegoptim pngquant | |
# download images | |
mkdir images | |
cd images | |
wget https://example.com/test_image_01.jpg | |
wget https://example.com/test_image_02.jpg | |
wget https://example.com/test_image_03.jpg | |
wget https://example.com/test_image_01.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.component() - Angular's API: | |
https://docs.angularjs.org/guide/component | |
angular-bem - A set of directives to simplify your workflow with BEM-markup in AngularJS applications. | |
https://github.com/tenphi/angular-bem | |
angular2-bem - A set of directives to simplify your workflow with BEM-markup in Angular 2 applications. (WORK IN PROGRESS) | |
https://github.com/tenphi/angular2-bem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// active directory group that have editor access to photos | |
photoEditorsGroup: 'PhotoEditorsAPP.RO', | |
// Active Directory group names will start with country name, and end with this suffix | |
countryGroupSuffix: 'PhotoApproverAPP.MOD', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(ng) { | |
'use strict'; | |
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){ | |
module.exports = 'tenphi.eventscope'; | |
} | |
ng.module('tenphi.eventscope', []) | |
.factory('EventScope', () => { | |
let listeners = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Presentation - *скоро появится* | |
*ngComponentOutlet Example - http://plnkr.co/edit/yscxeoYZ0Cfnzzk6Hgu7?p=preview | |
ComponentInjector Module - https://gist.github.com/tenphi/94b8732d894ce7cec088738c7201e79e | |
Полезные доклады про Angular: | |
The Angular 2 Compiler Tobias Bosch - https://youtu.be/kW9cJsvcsGo | |
Netanel Basal ViewContainerRef - https://netbasal.com/angular-2-understanding-viewcontainerref-acc183f3b682#.t9ip215zn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ViewContainerRef, ComponentRef, ComponentFactoryResolver, ViewChild, Type, Input, Compiler } from '@angular/core'; | |
// Helper component to add dynamic components | |
@Component({ | |
selector: 'tnp-component-injector', | |
template: `<div></div>` | |
}) | |
export class ComponentInjector { | |
@Input() component: Type<Component>; | |
@Input() props: Object = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import classNames from 'classnames'; | |
// modName -> mod_name | |
function toKebabCase(str) { | |
return str ? str.replace(/[A-Z]/g, function(s) {return '-' + s.toLowerCase() }).replace(/$\-/, '') : ''; | |
} | |
function BEM(blockName) { | |
blockName = blockName || ''; |
OlderNewer