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 | |
/** | |
* @file | |
* Angular View admin file. | |
*/ | |
function angular_refresh_endpoints($form, &$form_state, $no_js_use = FALSE) { | |
$form['#attached']['css'] = array( | |
drupal_get_path('module', 'angular_refresh') . '/angular_refresh.css', | |
); |
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
Do these steps inside your Vagrant machine. | |
1. Web Server | |
sudo apt-get install apache2 | |
2. PHP5 | |
sudo apt-get install php5 libapache2-mod-php5 | |
3. MySQL | |
sudo apt-get install mysql-server mysql-client |
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
watch -n 1 "mysql -u <user> -e 'SELECT message, referer, FROM_UNIXTIME('timestamp') FROM watchdog ORDER BY 'timestamp' DESC LIMIT 0,1' <database_name>" |
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
$machine_format = 1422969167; | |
echo date('l, F j, Y g:i a', $machine_format); | |
// Output | |
Wednesday, February 4, 2015 12:12 am |
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
To control the workstation using x2x: | |
ssh -XC user@host x2x -[north,east,south,west] -to :0.0 | |
This requires to have x2x installed on the target machine. |
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
git log --no-merges --pretty=format:"%h - %an, %ar : %s" --since="February 13 2015" |
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
/* Put this css in your subtheme css */ | |
/* Bootstrap admin menu fix */ | |
.logged-in #admin-toolbar ul.menu li a, | |
.logged-in div#admin-toolbar.vertical div.admin-tab { | |
height: 26px; | |
} |
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
SELECT fm.filename | |
FROM file_managed AS fm | |
LEFT OUTER JOIN file_usage AS fu | |
ON ( fm.fid = fu.fid ) | |
LEFT OUTER JOIN node AS n | |
ON ( fu.id = n.nid ) | |
WHERE (fu.TYPE = 'node' OR fu.TYPE IS NULL) | |
AND n.nid IS 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
(function ($, Drupal) { | |
Drupal.behaviors.refresh = { | |
attach: function(context, settings) { | |
var app = angular.module('app', []); | |
app.controller('appController', function($scope, Poller) { | |
$scope.data = Poller.data; | |
}); |
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 install php-pear | |
$ sudo pear channel-discover pear.drush.org | |
$ sudo pear install drush/drush | |
$ sudo drush | |
$ sudo chown -R $USER:$USER ~/.drush |
OlderNewer