- AllowOverride all (or write a custom VirtualHost directive)
- more memory to vm & PHP
- ip routing, so we can use host routing
- ideas
- https://github.com/edanisko/vagrant-ubuntu-lamp-zend
This file contains hidden or 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 | |
/** | |
* Returns query with escaped args injected into query. | |
* | |
* @param string $sql The query string. | |
* @param array $args The arguments to escape, quote, and inject into the query. | |
*/ | |
function query($sql, $args = array()) { | |
$quote = function($value) use (&$quote) { |
This file contains hidden or 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
// ESRI directive. | |
angular.module('esri', []).directive('esri', function() { | |
return { | |
scope: { | |
address: '=', | |
zoomable: '=', | |
enabled: '=' | |
}, | |
link: function(scope, element, attrs) { | |
var map; |
This file contains hidden or 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
// Sticky list directive. | |
angular.module('stickylist', []).directive('stickyList', function() { | |
// Stick header by setting the position to fixed, top to 0, and adding a | |
// "sticky" class so additional CSS can be applied. Padding is added to | |
// parent <li>. | |
var stick = function($header) { | |
$header.css({position: 'fixed', top: 0}).addClass('sticky'); | |
$header.parent().css('paddingTop', $header.outerHeight()); | |
} |
This file contains hidden or 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
// Standard horizontal list, using word-spacing trick to remove whitespace | |
// between inline-block elements. | |
@mixin horizontal-list { | |
padding: 0; | |
text-align: center; | |
word-spacing: -1em; | |
display: table; | |
width: 100%; | |
li { |
This file contains hidden or 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 | |
/** | |
* Configure ratios, columns, breakpoints, and other stuff. | |
*/ | |
function custom_config() { | |
return array( | |
'ratios' => array( | |
'wide' => array('width' => 1, 'height' => .5), | |
'normal' => array('width' => 1, 'height' => .75), |
This file contains hidden or 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
// Responsive images. | |
img, media | |
max-width: 100% | |
// Messages. | |
.messages | |
margin: 1em 0 | |
// Tabs. | |
.tabs |
- If Advanced Content Filter is enabled, need to configure "extra allowed content" to let elements have classes.
- A catch all value is
*(*)
, which means any element can have any class added to it. - To refine this, you can limit available classes, like
*(left, right)
, which will only let "left" and "right" classes be added. - Enhanced Image (image2 plugin) can only be targeted through a "widget" type, by defining
type: 'widget'
and thenwidget: 'image'
.
This file contains hidden or 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
angular.module('drupalBehaviors', []) | |
.directive('drupalBehaviors', function($timeout) { | |
return { | |
restrict: 'AE', | |
link: function(scope, element, attrs) { | |
function attach() { | |
$timeout(function() { | |
Drupal.attachBehaviors(element.get(0), drupalSettings); | |
}); |
This file contains hidden or 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
-----BEGIN CERTIFICATE----- | |
MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC | |
VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u | |
ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc | |
KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u | |
ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1 | |
MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE | |
ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j | |
b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF | |
bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg |
OlderNewer