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
#!/bin/bash | |
DIRS="./app/modules/custom/ ./app/themes/custom/" | |
for i in $(seq 0 4); do | |
echo "Looking for @expire $(date -d "-$i month" "+%b %Y")." | |
grep -rni "@expire $(date -d "-$i month" "+%b %Y")" $DIRS && exit 1 | |
done | |
exit 0 |
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 | |
namespace Drupal\local_testing; | |
trait LocalTestingTrait { | |
/** | |
* Screenshot. | |
*/ | |
public function takeScreenshot() { |
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 | |
$main_menu_links = menu_load_links('main-menu'); | |
foreach ($main_menu_links as $menu_item) { | |
if ($menu_item['link_path'] == 'node/1' && $menu_item['link_title'] !== 'Home') { | |
$new_node = node_load(replicate_entity_by_id('node', 1)); | |
$new_node->title = $menu_item['link_title']; | |
$menu_item['link_path'] = 'node/' . $new_node->nid; | |
menu_link_save($menu_item); | |
node_save($new_node); | |
} |
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
<style type='text/css'> | |
a { | |
position: absolute; | |
display: block; | |
top:0; | |
bottom:0; | |
left:0; | |
right:0; | |
} | |
</style> |
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
@mixin grid($columns, $item-selector: '.views-row', $padding: 15px) { | |
margin: 0 (-1 * ($padding/2)); | |
@include clearfix; | |
#{$item_selector} { | |
padding: { | |
left: $padding / 2; | |
right: $padding / 2; | |
} | |
float: left; | |
@include box-sizing(border-box); |
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
javascript:var $=jQuery;var str="";var nl="\n";$.each($("form"),function(e,t){str+="$"+$(t).attr("id").split("-").join("_")+" = array("+nl;$.each($(t).find("input, select, textarea"),function(e,t){var n=$(t).attr("name");var r=$(t).val().split("'").join("\\'");if(n=="op"||n==""||n=="form_build_id"||n=="form_token"||n=="form_id"){return}str+=" '"+n+"' => '"+r+"',"+nl});str+=");"+nl+nl});console.log(str); |
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
<Directory "/Users/sam/Sites/"> | |
Options Indexes MultiViews | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
<VirtualHost *:80> |
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 | |
// ctags --langmap=php:.engine.inc.module.theme.install.php --php-kinds=cdfi --languages=php --recurse | |
function only_first_part($array) { | |
$delim = "\t"; | |
foreach ($array as $i => &$line) { | |
$parts = explode($delim, $line); | |
$line = $parts[0]; | |
} |
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
actions_actions_map is no longer in D8. | |
actions_delete is no longer in D8. | |
actions_do is no longer in D8. | |
actions_function_lookup is no longer in D8. | |
actions_get_all_actions is no longer in D8. | |
actions_list is no longer in D8. | |
actions_load is no longer in D8. | |
actions_save is no longer in D8. | |
actions_synchronize is no longer in D8. | |
aggregator_admin_form is no longer in D8. |
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
@mixin clearfix{ | |
&:after{ | |
visibility: hidden; | |
display: block; | |
font-size: 0; | |
content: " "; | |
clear: both; | |
height: 0; | |
} | |
} |
NewerOlder