Skip to content

Instantly share code, notes, and snippets.

View andreychev's full-sized avatar
🎯
Focusing

Philipp Andreychev andreychev

🎯
Focusing
View GitHub Profile
import React, { PropTypes } from 'react';
import Constants from 'cx-api/constants';
import Loading from 'ux/flow/Loading';
function isPending(loadingComponent) {
function pendingHOC({ status, loading = {}, children }) {
if (status === Constants.STATE_PENDING) {
return (<loadingComponent { ...loading } />);
@andreychev
andreychev / keybase.md
Created February 22, 2016 14:56
keybase.md

Keybase proof

I hereby claim:

  • I am andreychev on github.
  • I am andreychev (https://keybase.io/andreychev) on keybase.
  • I have a public key ASDJg2gdXpwVt3epy8c1LJOfGJD_45gIN-ob8mZo4fGNxgo

To claim this, I am signing this object:

@andreychev
andreychev / sync.sh
Last active August 29, 2015 14:19
new sync
#!/bin/bash
set -u # prevent unbound variables
set -e # terminate on error
SSH_PORT=$(boot2docker config 2>&1 | awk '/SSHPort/ {print $3}')
# install rsync
boot2docker ssh tce-load -wi rsync
function EventStatusConfig ($provide) {
$provide.decorator('ProjectDotService', function EventsPopupInProject ($delegate, ...) {
$delegate.getEventPopup = function (scope, activityInd) {
...
};
return $delegate;
});
@andreychev
andreychev / autocomplete.js
Created March 21, 2014 11:14
typeheadOpenOnFocus
// расширяет функционал стандартного typeahead - вызывает запрос по фокусу в инпут
.directive('typeaheadOpenOnFocus', function() {
return {
require: ['ngModel'],
link: function(scope, element, attr, ctrls) {
element.bind('click', function () {
ctrls[0].$setViewValue(element.val() || ' ');
});
}
};
@andreychev
andreychev / mudrost.rb
Last active August 29, 2015 13:57
Мудрость общения в Скайпе или других мессенджерах
if skype.dispute.length >= 10.minutes
call(participants)
end
@andreychev
andreychev / capitel.css
Last active December 28, 2015 02:39
Capitel
.smallcapitals {
font-size: 0.875em;
letter-spacing: 0.15em;
margin-right: -0.15em;
}
.classiccapitals {
font-variant: small-caps;
}
@andreychev
andreychev / precommit-hook
Created October 24, 2013 10:38
precommit-hook
#!/bin/sh
echo "\nStarting Grunt tests"
# Lint catalog js files with grunt.js
grunt catalog
RETVAL=$?
[ $RETVAL -eq 0 ] && echo Success
[ $RETVAL -ne 0 ] && echo Failure
@andreychev
andreychev / popup_edit_form.js
Created October 16, 2013 12:12
initSaveOnEnter
initSaveOnEnter: function() {
this.popup
.off('keyup.saveOnEnter')
.on('keyup.saveOnEnter', function(event) {
var target = event.target,
targetEl = $(target);
if (event.which == 13 && target.tagName != 'TEXTAREA' && !targetEl.hasClass('ui-autocomplete-input') && !targetEl.hasClass('js-save_on_enter')) {
this.popup
.find('.js-submit_button')
{
"directory": "scripts/bower"
}