Skip to content

Instantly share code, notes, and snippets.

View tenphi's full-sized avatar
💭
Try Numl.Design

Andrey Yamanov tenphi

💭
Try Numl.Design
View GitHub Profile
(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 = {};
// 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',
@tenphi
tenphi / tools-for-angularjs-components.txt
Created February 24, 2016 12:42
Set of tools for making AngularJS components
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
# 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
@tenphi
tenphi / highlight-css.js
Created September 9, 2015 15:50
highlight all elements with certain css property with jquery
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');
}
});
@tenphi
tenphi / 0_reuse_code.js
Last active September 7, 2015 21:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tenphi
tenphi / nodo-install.log
Created May 28, 2012 10:09
nodo installation error
info it worked if it ends with ok
verbose cli [ 'node', '/usr/local/bin/npm', 'install', '-g', 'nodo' ]
info using npm@1.1.21
info using node@v0.6.18
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 ] ]