Glossary:
- md: multiple devices
command | description |
---|---|
cat /proc/mdstat |
show status of all raids |
mdadm --detail /dev/md0 |
detailed status of raid md0 |
I couldn't find any documentation about Twig Fields using Display Suite, so I decided to create one on my own. You are very welcome to add more information.
Adding a Twig field in Drupal Display Suite, you can use the following syntaxes:
Render the ID of the current entity:
{{ entity.id }}
Render the value of a text field (called 'Foo'):
<?php | |
// source: http://cker.name/webadmin/ | |
/* | |
* webadmin.php - a simple Web-based file manager | |
* Copyright (C) 2004-2011 Daniel Wacker [daniel dot wacker at web dot de] | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. |
/*** | |
* This gist provides a __FILE__ variable, which holds the path to the file | |
* from which the currently running source is being executed. | |
* | |
* Usage example: alert(__FILE__); | |
* | |
* Thanks to http://ejohn.org/blog/__file__-in-javascript/ on which this gist | |
* is based on. | |
* | |
* Tested in Mozilla Firefox 9, Mozilla Firefox 16, Opera 12, Chromium 18 |
Often you need to download and extract archives from the internet, e.g. to install Drupal modules. Therefore you download the archive, extract it and remove the original archive. Using modern[tm] UNIX pipes you can directly pipe it to tar; therefore you don't need to save and remove the archive.
Example:
user@host> wgetar http://ftp.drupal.org/files/projects/views-7.x-3.5.tar.gz
See the result: {{{ user@host> ls -R
I got the task of upgrading an old Drupal 6 webpage to a newer version. We decided to skip Drupal 7 and go directly for Drupal 8 with the new bibcite module (although it is still at 1.0-alpha7 at the time of this writing).
Upgrading most of the content of Drupal 6 to Drupal 8 worked rather fine, with the exception of the Views which have to be migrated separately. Migrating the content of the biblio to bibcite was quite a task though. In this text, I will report how I did the transition.
One of the biggest hurdles was, that the migration would split the publications into two separate entitys. In Drupal 6, there was a "Biblio" content type, which had a "biblio" field with all the bibliographic sub-fields. And there were a fewer custom fields (via CCK), e.g. a teaser image and some node references to projects (which were a separate content type).
After the migration, the publications are a separate entity type (Content -> Biblio
<?php | |
$db = new PDO('mysql:dbname=drupal8', '', ''); | |
$res = $db->query("select * from config where name='core.entity_view_display.bibcite_reference.conference_paper.search_result'"); | |
$elem = $res->fetch(); | |
$orig_data = unserialize($elem['data']); | |
$res = $db->query("select * from config where name like 'bibcite_entity.bibcite_reference_type.%'"); | |
$types = array(); | |
while ($elem = $res->fetch()) { | |
$type = substr($elem['name'], 38); |
#!/usr/bin/env node | |
var async = require('async') | |
var PouchDB = require('pouchdb') | |
PouchDB.plugin(require('pouchdb-find')) | |
var db = PouchDB('foobar') | |
async.series([ | |
// drop database and re-create (always start with new database) |
Making all in iniparser3.0b | |
make[1]: Entering directory `/home/skunk/mod_tile/iniparser3.0b' | |
make[1]: Nothing to be done for `all'. | |
make[1]: Leaving directory `/home/skunk/mod_tile/iniparser3.0b' | |
make[1]: Entering directory `/home/skunk/mod_tile' | |
g++ -DHAVE_CONFIG_H -I. -I./includes -I/usr/include/freetype2 -pthread -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -MT gen_tile.o -MD -MP -MF .deps/gen_tile.Tpo -c -o gen_tile.o `test -f 'src/gen_tile.cpp' || echo './'`src/gen_tile.cpp | |
In file included from /usr/include/c++/4.8/mutex:35:0, | |
from /usr/local/include/mapnik/config.hpp:56, | |
from /usr/local/include/mapnik/color.hpp:27, | |
from /usr/local/include/mapnik/map.hpp:27, |