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
<?php | |
if (!drupal_is_cli()) { | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Credentials: true'); | |
header('Access-Control-Allow-Headers: Authorization, access-token, access_token'); | |
} |
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
#!/bin/bash | |
######################################################################################### | |
# | |
# Configuration used in the different scripts. | |
# | |
# Copy this file in the same directory, the filename of the copy should be "config.sh". | |
# | |
######################################################################################### |
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
steps: | |
- name: Setup working directory | |
command: "drush fec --json-config='{\"settings_php.snippets\": []}' --local-environment=probo icenter 7 " | |
- name: Drop the old database | |
command: 'drush --root=/var/www/icenter/webroot sql-drop -y' | |
- name: Install grunt | |
command: "npm install -g grunt-cli" | |
- name: Install bower | |
command: "npm install -g bower" | |
- name: Install Sass and Compass for Grunt to work |
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
Create broadcast: | |
$rootScope.$broadcast('scanner-started'); | |
Listen to event: | |
$scope.$on('scanner-started', function(event, args) { | |
// do what you want to do | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bootstrap Case</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
<script type="text/javascript" src="assets/twitterbootstrap/js/bootstrap-tab.js"></script> |
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
#!/bin/bash | |
PANTHEON_DIR="/Library/WebServer/Documents/repo" | |
rm -rf $PANTHEON_DIR/profiles/pipeline | |
cp -R pipeline $PANTHEON_DIR/profiles/pipeline | |
rsync -avz --exclude '1' pipeline $PANTHEON_DIR/profiles/ |
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
/** | |
* Implements hook_entity_info_alter(). | |
* | |
* Add "Activity stream" view mode. | |
*/ | |
function c4m_message_entity_info_alter(&$entity_info) { | |
$entity_info['message']['view modes']['activity_stream'] = array( | |
'label' => t('Activity stream'), | |
'custom settings' => TRUE, | |
); |
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
$element['target_id']['#element_validate'][] = 'c4m_og_vocab_validate'; |
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
/** | |
* Authenticates a user with password from configuration. | |
* | |
* @Given /^I am logged in as user "([^"]*)"$/ | |
*/ | |
public function iAmLoggedInAsUser($username) { | |
$this->user = new stdClass(); | |
$this->user->name = $username; | |
$this->user->pass = $this->drupal_users[$username]; | |
$this->login(); |
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
- sudo apt-get update | |
- sudo apt-get install build-essential chrpath libssl-dev libxft-dev | |
- sudo apt-get install libfreetype6 libfreetype6-dev | |
- sudo apt-get install libfontconfig1 libfontconfig1-dev | |
- export PHANTOM_JS="phantomjs-1.9.7-linux-x86_64" | |
- wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 | |
- sudo mv $PHANTOM_JS.tar.bz2 /usr/local/share/ | |
- sudo tar xvjf /usr/local/share/$PHANTOM_JS.tar.bz2 | |
- sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs | |
- sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs |
NewerOlder