Skip to content

Instantly share code, notes, and snippets.

View vladdancer's full-sized avatar
🖖

Vlad Moyseenko vladdancer

🖖
View GitHub Profile
var myApp = angular.module('myApp',[]);
function Parent($scope) {
$scope.name = 'Superhero';
$scope.clickParent = function() {
$scope.name = 'Clicked from base controller';
}
}
'use strict';
(function() {
var mod = angular.module("App.services", []);
//register other services here...
/* pubsub - based on https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js*/
mod.factory('pubsub', function() {
var cache = {};
SET filepath = REPLACE(filepath, 'sites/default/files', '');
@vladdancer
vladdancer / setup_project_drupalpro_pantheon.sh
Created June 2, 2014 11:37
Setup new project instance from pantheon service in the Drupalpro environment.
# add drush aliases.
# Please, first is download this file from pantheon if you haven't did it early
# and place to the .drush folder
cd ~/
cp ~/Downloads/pantheon.aliases.drushrc.php ~/.drush
cd ~/websites
# use 'drush sa' command to check if drush is using new aliases.
# this command will provide list of aliases, so you need to check something like
# pantheon.*
<?php
#!/usr/bin/env drush
// Example rebuild script
// local alias
$self_record = drush_sitealias_get_record('@self');
$self_name = '@' . $self_record['#name'];
@vladdancer
vladdancer / change-fetch-git-repo-url.sh
Created November 18, 2014 14:12
Change fetch git repository url
git remote set-url origin https://[email protected]/companyname/projectname.git
#! /bin/bash
# Only install if not exists
if [ ! -x /usr/bin/ansible ]; then
echo ">>> Installing ansible";
apt-get update
apt-get install python-pip python-dev git -y
pip install PyYAML jinja2 paramiko
<?php
/**
* @file
* Code for the Message notify example feature.
*/
include_once('message_notify_example.features.inc');
/**
* Implements hook_comment_insert().
@vladdancer
vladdancer / install_mailhog_with_ansible.sh
Created March 19, 2015 17:16
Install Mailhog with Ansible. Default HTTP port is 8025
#! /bin/bash
# Only install if not exists
if [ ! -x /usr/bin/ansible ]; then
echo ">>> Installing ansible";
#apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible -y
apt-get update
apt-get install ansible -y
@vladdancer
vladdancer / flex.less
Last active August 29, 2015 14:28 — forked from codler/flex.less
Prefix flex for IE10 and Safari / iOS in LESS
/*! Prefix flex for IE10 and Safari / iOS in LESS
* https://gist.github.com/codler/2148ba4ff096a19f08ea
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */
.display(@value) when (@value = flex) {
display: -ms-flexbox; // IE10
display: -webkit-flex; // Safari / iOS
}
.display(@value) when (@value = inline-flex) {