Version 85 (modified by 8 years ago) ( diff ) | ,
---|
Who we are?
http://gripuqam.org We are french speaking so this page will be translated unsing the advise in faq/translate/pages
Wiki page we read or collaborate to write @ mayfirst
- faq/translate/pages
- WikiFormatting
- http://trac.edgewall.org/wiki/TracSyntaxColoring
- Trac Syntax Coloring Example
{{{#!sh }}} {{{#!application/x-shellscript }}}
path$ echo "World" ; ls ; cd ; help # comment
{{{#!json }}} {{{#!application/json }}}
{ "name": "drupal7", # comment forbidden in json "private": true // no coma here! }
- #!diff
- #!yml
- #!text/x-yaml
- #!application/x-yaml
- #!xml
- #!application/xml-dtd ...
- #!html Insert custom HTML in a wiki page.
- #!text/html The result will be syntax highlighted HTML code
- #!text/html+twig
- #!application/x-twig
- #!application/x-httpd-php5
- #!python
- #!php
- #!text/x-php
- #!text/css
- #!js
- #!text/javascript ...
- #!sql
- #!text/x-sql
- #!text/x-sqlite3-console
- #!text/x-postgresql-psql ...
- #!text/x-mysql
- #!text/x-diff
- #!text/x-trac-wiki
- #!application/x-sh-session No macro or processor named 'application/x-sh-session' found
- Trac Syntax Coloring Example
- http://trac.edgewall.org/wiki/TracSyntaxColoring
- TicketQuery Macro (tagging tickets) examples:
- There is somewhere a useful cloud of tags. faq/wordpress/WordPressInstall
- Tag for Debian packages
[DebianPackage:python-whoosh]
python-whoosh
Tickets we follow
Taged with GRIP-UQAM
Taged with python, tendenci, django, pyramid, php, drupal7, drupal, golang, fastcgi, chelsea, ossie
Results (1 - 10 of 1097)
Ticket | Modified | Resolution | Owner | Summary |
---|
Reported by us
No results
Taged with GRIP-UQAM with description
Results (1 of 21)
Ticket | Modified | Resolution | Owner | Summary |
---|
Development Tool
Pages we may need one day
Cron
- Consider output to an (even empty) file a good practice allowing to check last time the command has been executed. This is because some subtle errors may prevent execution of cron commands, eg. see #11534
... &> cron/results/<file>
- Consider nice and ionice to give priority to interactive tasks
nice -n 127 ionice --class=idle ...
Some PostgreSQL commands
- List of DB with parameters
$ psql postgres --command="\l"
- Create user
postgres:~$ createuser -D -R -S <UNIX user>
- Create DB
postgres:~$ createdb -O <postgres user> <database name>
- Backup
$ pg_dump -Fc --verbose --file=<file name (.data)> <database name>
- Restore the data base as a different user eg. to clone a Drupal website (bad idea to clone a drupal website)
$ pg_restore --verbose --no-owner --no-privileges --dbname=<database name> <file name (.data)>
- See SQL requests send by
psql
for commands like \l (\list)$ psql -E --dbname postgres
- Drop all tables in a database
- keywords: drop all tables from postgres database
- This can be copyed into psql
DROP FUNCTION IF EXISTS remove_all(); CREATE FUNCTION remove_all() RETURNS void AS $$ DECLARE rec RECORD; cmd text; BEGIN cmd := ''; FOR rec IN SELECT 'DROP SEQUENCE ' || quote_ident(n.nspname) || '.' || quote_ident(c.relname) || ' CASCADE;' AS name FROM pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_namespace AS n ON n.oid = c.relnamespace WHERE relkind = 'S' AND n.nspname NOT IN ('pg_catalog', 'pg_toast') AND pg_catalog.pg_table_is_visible(c.oid) LOOP cmd := cmd || rec.name; END LOOP; FOR rec IN SELECT 'DROP TABLE ' || quote_ident(n.nspname) || '.' || quote_ident(c.relname) || ' CASCADE;' AS name FROM pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_namespace AS n ON n.oid = c.relnamespace WHERE relkind = 'r' AND n.nspname NOT IN ('pg_catalog', 'pg_toast') AND pg_catalog.pg_table_is_visible(c.oid) LOOP cmd := cmd || rec.name; END LOOP; FOR rec IN SELECT 'DROP FUNCTION ' || quote_ident(ns.nspname) || '.' || quote_ident(proname) || '(' || oidvectortypes(proargtypes) || ');' AS name FROM pg_proc INNER JOIN pg_namespace ns ON (pg_proc.pronamespace = ns.oid) WHERE ns.nspname = 'public' ORDER BY proname LOOP cmd := cmd || rec.name; END LOOP; EXECUTE cmd; RETURN; END; $$ LANGUAGE plpgsql; SELECT remove_all();
http://stackoverflow.com/questions/3327312/drop-all-tables-in-postgresql
Git
- Branches and tags
- keyword: how to find the tag of a git
- https://git-scm.com/book/en/v2/Git-Basics-Tagging
- http://stackoverflow.com/questions/978052/how-can-i-make-my-local-repository-available-for-git-pull
Json
.json validator
- keyword: linux json validator
- keyword: json validator site:debian.org
- jsonlint
- jsonlint
composer require seld/jsonlint
- https://packagist.org/packages/seld/jsonlint
- python-json-schema-validator
- jsonlint
Javascript packages: Bower
From npm to bower
- $ nice -n 127 ionice --class=idle npm install bower --save
- $ nice -n 127 ionice --class=idle npm update #update!
- or (like there is something to check here)
- $ nice -n 127 ionice --class=idle npm update bower #update!
- .bowerrc
- $ nice -n 127 ionice --class=idle nodejs node_modules/bower/bin/bower init # to start a new empty bower.json
- Install some libraries...
- $ nice -n 127 ionice --class=idle nodejs node_modules/bower/bin/bower update --production #update!
Example .bowerrc for Drupal 7
{ "directory" : "../../web/sites/all/libraries" }
Install Javascript libraries with Bower package manager
#$ nodejs node_modules/bower/bin/bower install --save "jquery#1.4.4" # Drupal 7 version # or (good idea (checked)) nodejs node_modules/bower/bin/bower install --save jquery#~1.4.4 # Drupal 7 version nodejs node_modules/bower/bin/bower install --save jquery-colorbox # depends on jquery nodejs node_modules/bower/bin/bower install --save ckeditor#full/stable
- https://github.com/npm/node-semver#ranges (valid for Bower)
- $ ls bower_components/
- or
- $ ls ../../web/sites/all/libraries
- https://packagist.org/packages/ckeditor/ckeditor
- Supported Editors Matrix https://www.drupal.org/node/596966
- jquery version for Drupal 7 https://www.drupal.org/node/171213
- same with jQuery Update module https://www.drupal.org/project/jquery_update
- https://packagist.org/packages/kraksoft/colorbox
- https://github.com/Spea/SpBowerBundle
Example bower.json for Drupal 7
{ "name": "drupal7", "private": true, "ignore": [ "**/.*", "node_modules", "bower_components", "../../web/sites/all/libraries", "test", "tests" ], "dependencies": { "jquery": "~1.4.4", "jquery-colorbox": "^1.6.3", "ckeditor": "#full/stable" } }
Composer
Some Composer documentation
- http://composer.json.jolicode.com/
- https://getcomposer.org/doc/04-schema.md#repositories
- https://getcomposer.org/doc/05-repositories.md#packages
- https://getcomposer.org/doc/05-repositories.md#disabling-packagist
Some Composer commands
- $ ./composer.phar self-update
- $ ./composer.phar update
Composer extensions
Includes
- keywords: includes from composer.json
- https://github.com/composer/composer/issues/183#issuecomment-151317582
- https://github.com/wikimedia/composer-merge-plugin
- https://getcomposer.org/doc/06-config.md#use-include-path
- https://getcomposer.org/doc/05-repositories.md#includes
Example composer.json for Drupal 7
composer require drush/drush composer require seld/jsonlint
{ "require": { "drush/drush": "^8.0", "seld/jsonlint": "^1.4", "ezyang/htmlpurifier": "^4.7", "kraksoft/colorbox": "^1.5", "pelago/emogrifier": "^1.0", "tinymce/tinymce": "^3.5", # remove this line, this version is not available through composer! "ckeditor/ckeditor": "^full/4.5.1" } }
- http://docs.drush.org/en/master/install/
- https://packagist.org/packages/ezyang/htmlpurifier
- http://htmlpurifier.org/download
- https://packagist.org/packages/pelago/emogrifier
- https://www.drupal.org/project/emogrifier
- php composer target directory
Local Repositories
{ "require": { "drush/drush": "8.0.5" }, "repositories": [ { "type": "git", "url": "../share/url/github.com/drush-ops/drush/8.0.5" }, { "type": "path", "url": "../share/url/github.com/*/*/*" } ] }
The next one does not work!
{ "require": { "drush/drush": "8.0.5" }, "repositories": [ { "type": "composer", "url": "file://tmp/gripuqam/share/url" } ] }
https://getcomposer.org/doc/05-repositories.md#package-2
{ "packages": { "drupal/core": { "8.0.5": { { "name": "drupal/core", "version": "8.0.5", "dist": { "url": "github.com/drupal-composer/drupal-core/8.0.5", "type": "path" } } } } "drush/drush": { "8.0.5": { { "name": "drush/drush", "version": "8.0.5", "dist": { "url": "github.com/drush-ops/drush/8.0.5", "type": "path" } } } } "psr/log": { "1.0.0": { { "name": "psr/log", "version": "1.0.0", "dist": { "url": "github.com/php-fig/log/1.0.0", "type": "path" } } } } } } { "require": { "drupal/core": "8.0.5" }, "repositories": [ { "type": "package", "package": { "name": "drupal/core", "version": "8.0.5", "dist": { "url": "../share/url/github.com/drupal-composer/drupal-core/8.0.5", "type": "path" }, "description": "Drupal is an open source content management platform powering millions of websites and applications.", "type": "drupal-core", "license": "GPL-2.0+", "require": { "php": ">=5.5.9", "symfony/class-loader": "2.7.*", "symfony/console": "2.7.*", "symfony/dependency-injection": "2.7.*", "symfony/event-dispatcher": "2.7.*", "symfony/http-foundation": "~2.7.2", "symfony/http-kernel": "2.7.*", "symfony/routing": "2.7.*", "symfony/serializer": "2.7.*", "symfony/translation": "2.7.*", "symfony/validator": "2.7.*", "symfony/process": "2.7.*", "symfony/yaml": "2.7.*", "twig/twig": "^1.23.1", "doctrine/common": "2.5.*", "doctrine/annotations": "1.2.*", "guzzlehttp/guzzle": "~6.1", "symfony-cmf/routing": "1.3.*", "easyrdf/easyrdf": "0.9.*", "zendframework/zend-feed": "~2.4", "stack/builder": "1.0.*", "egulias/email-validator": "1.2.*", "masterminds/html5": "~2.1", "symfony/psr-http-message-bridge": "v0.2", "zendframework/zend-diactoros": "~1.1", "composer/semver": "~1.0" }, "require-dev": { "behat/mink": "~1.6", "behat/mink-goutte-driver": "~1.2", "jcalderonzumba/gastonjs": "~1.0.2", "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", "mikey179/vfsStream": "~1.2", "phpunit/phpunit": "~4.8", "symfony/css-selector": "2.7.*" }, "replace": { "drupal/action": "self.version", "drupal/aggregator": "self.version", "drupal/automated_cron": "self.version", "drupal/bartik": "self.version", "drupal/ban": "self.version", "drupal/basic_auth": "self.version", "drupal/block": "self.version", "drupal/block_content": "self.version", "drupal/book": "self.version", "drupal/breakpoint": "self.version", "drupal/ckeditor": "self.version", "drupal/classy": "self.version", "drupal/color": "self.version", "drupal/comment": "self.version", "drupal/config": "self.version", "drupal/config_translation": "self.version", "drupal/contact": "self.version", "drupal/content_translation": "self.version", "drupal/contextual": "self.version", "drupal/core-annotation": "self.version", "drupal/core-bridge": "self.version", "drupal/core-datetime": "self.version", "drupal/core-diff": "self.version", "drupal/core-discovery": "self.version", "drupal/core-event-dispatcher": "self.version", "drupal/core-file-cache": "self.version", "drupal/core-gettext": "self.version", "drupal/core-graph": "self.version", "drupal/core-php-storage": "self.version", "drupal/core-plugin": "self.version", "drupal/core-proxy-builder": "self.version", "drupal/core-serialization": "self.version", "drupal/core-transliteration": "self.version", "drupal/core-utility": "self.version", "drupal/core-uuid": "self.version", "drupal/datetime": "self.version", "drupal/dblog": "self.version", "drupal/dynamic_page_cache": "self.version", "drupal/editor": "self.version", "drupal/entity_reference": "self.version", "drupal/field": "self.version", "drupal/field_ui": "self.version", "drupal/file": "self.version", "drupal/filter": "self.version", "drupal/forum": "self.version", "drupal/hal": "self.version", "drupal/help": "self.version", "drupal/history": "self.version", "drupal/image": "self.version", "drupal/inline_form_errors": "self.version", "drupal/language": "self.version", "drupal/link": "self.version", "drupal/locale": "self.version", "drupal/minimal": "self.version", "drupal/menu_link_content": "self.version", "drupal/menu_ui": "self.version", "drupal/migrate": "self.version", "drupal/migrate_drupal": "self.version", "drupal/node": "self.version", "drupal/options": "self.version", "drupal/page_cache": "self.version", "drupal/path": "self.version", "drupal/quickedit": "self.version", "drupal/rdf": "self.version", "drupal/responsive_image": "self.version", "drupal/rest": "self.version", "drupal/search": "self.version", "drupal/serialization": "self.version", "drupal/seven": "self.version", "drupal/shortcut": "self.version", "drupal/simpletest": "self.version", "drupal/standard": "self.version", "drupal/stark": "self.version", "drupal/statistics": "self.version", "drupal/syslog": "self.version", "drupal/system": "self.version", "drupal/taxonomy": "self.version", "drupal/telephone": "self.version", "drupal/text": "self.version", "drupal/toolbar": "self.version", "drupal/tour": "self.version", "drupal/tracker": "self.version", "drupal/update": "self.version", "drupal/user": "self.version", "drupal/views": "self.version", "drupal/views_ui": "self.version" }, "minimum-stability": "dev", "prefer-stable": true, "autoload": { "psr-4": { "Drupal\\Core\\": "lib/Drupal/Core", "Drupal\\Component\\": "lib/Drupal/Component", "Drupal\\Driver\\": "../drivers/lib/Drupal/Driver" }, "files": [ "lib/Drupal.php" ], "classmap": [ "lib/Drupal/Component/Utility/Timer.php", "lib/Drupal/Component/Utility/Unicode.php", "lib/Drupal/Core/Database/Database.php", "lib/Drupal/Core/DrupalKernel.php", "lib/Drupal/Core/DrupalKernelInterface.php", "lib/Drupal/Core/Site/Settings.php" ] }, "config": { "preferred-install": "dist", "autoloader-suffix": "Drupal8" }, "scripts": { "pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump", "post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess" } } } ] }
Some Drush commands
- drush -v help
- drush -v status
- drush -v core-status
- drush -v status-report
- drush -v elysia-cron
- drush -v core-cron
- drush -v pm-refresh
- drush -v rf
- drush -v pm-download
- drush -v dl
- drush -v pm-updatecode
- drush -v upc
- drush -v pm-update
- drush -v up
- drush -v pm-list
- drush -v pml
- drush --status=enabled pm-list
- drush pm-info <admin_menu|...>
- drush pm-enable
- drush pm-disable
- drush -v updatedb
- drush -v updb
- drush libraries-list
- drush -v l10n-update-status
- drush -v cache-clear
- drush -v bam-sources
- use --uri="http://example.org" then sending mail for simplenews https://www.drupal.org/node/1776536
- nice...
Installing Drupal 7 or 8 with Composer (on a development server outside MayFirst)
$ composer create-project "drupal-composer/drupal-project" <directory>
- Composer in relation to Drush Make
- https://github.com/drupal-composer/drupal-project/tree/8.x
- https://packagist.org/packages/drupal-composer/drupal-project
- https://packagist.org/packages/drupal/core
- Composer preserve paths
Using symlinks to avoid duplication of code and save server memory
- locally clone repositories using git (see below:
git
for Drupal)- composer version inference from git repositories is not reliable today with Composer version 1.0.0-beta2 2016-03-27
- https://getcomposer.org/doc/05-repositories.md#path
- https://discuss.flarum.org/d/1608-extension-development-using-composer-repositories-path It looks like
*
is accepted...{ #... "repositories": [ { "type": "path", "url": "workbench/*/" } ], #... }
- https://discuss.flarum.org/d/1608-extension-development-using-composer-repositories-path It looks like
- spot larger libraries (and the one used more often)
.../vendor$ du */* -sch | sort -h
.../vendor$ du */* -sc | sort -n
- https://getcomposer.org/doc/articles/troubleshooting.md
Installing Drupal 7 or 8 with Drush (on a development server outside MayFirst)
$ drush help site-install $ drush dl drupal-7 $ cd drupal-7.43/ $ drush site-install minimal --db-url=sqlite://sites/default/files/.ht.sqlite $ drush site-install minimal --db-url="pgsql:host=/var/run/postgresql;dbname=infolettre-alici-webadmin;user=infolettre-alici-webadmin" $ drush rs
git
for Drupal
$ git ls-remote --tags <repository> | sort --key=2 --version-sort | less $ git clone --branch <branch or tag> <repository> <directory>
- branch may evolve (devel) like 8.0.x
- tag are frozen, like stable releases as in 8.0.5
- directory may be
.../share/url/<URL>/<version>
,.../share/vendor/<vendor>/<package>/<version>
or.../share/latest/...
..../share/url$ git clone --branch 8.0.5 "https://git.drupal.org/project/drupal.git" git.drupal.org/project/drupal/8.0.5 .../share/url$ cd git.drupal.org/project/drupal/8.0.5 ; git branch -v * (aucune branche) d918ae1 Drupal 8.0.5
$ git ls-remote --tags https://github.com/drupal-composer/drupal-core | sort --key=2 --version-sort | less .../share/url$ git clone --branch 8.0.5 "https://github.com/drupal-composer/drupal-core" github.com/drupal-composer/drupal-core/8.0.5 .../share/url$ cd github.com/drupal-composer/drupal-core/8.0.5 ; git branch -v * (aucune branche) da4c151 Drupal 8.0.5
- https://www.drupal.org/project/drupal/git-instructions
- Creating a branch or tag in Git
- https://www.drupal.org/project/git_deploy
- 10.3 Git Internals - Git References
Drupal 8 requirements and particularities
- Drupal 8.0.5 needs Postgresql >= 9.1.2 instead of 8.4.20 #11587, #11522
- Drupal 8.0.5 works with Postgres, but not
drush site-install
CKEditor for Drupal 7
Lets'use wysiwyg module
- Supported Editors Matrix https://www.drupal.org/node/596966
- $ drush dl --select wysiwyg
- $ drush dl wysiwyg-2.x-dev
- $ drush en wysiwyg
- $ drush status-report
- .../sites/all/libraries$ ln -s .../bower_components/ckeditor/ .
Does not work! Brobably because of symbolic links... better use .bowerrc to set target directory as suggested above.
http://cdn.ckeditor.com/4.5.4/full-all
Useful Debian Packages (Chelsea)
- apache2-mpm-worker(debian 8 jessie apache2 which uses mpm_event by default)
- apache2-suexec-custom (also debian 8 jessie apache2-suexec-pristine or debian 7 wheezy apache2-suexec)
- libapache2-mod-fcgid
- php5-cgi
- since february 2016 MayFirst uses mod_proxy_fcgi + php5-fpm
Note Altern-C
- Altern-C seems to use libapache2-mpm-itk(debian 7 wheezy apache2-mpm-itk)
To keep in mind
4875 id=4875 No results No results No results No results
drupal.org followup
PHP Libraries
hybridauth/hybridauth
http://hybridauth.sourceforge.net/userguide.html
$ composer require hybridauth/hybridauth
Google::
- easy
- easy
OpenID::
- easy (no secret information needed)
- https://github.com/hybridauth/hybridauth/tree/master/additional-providers/hybridauth-yahoo-openid
- http://hybridauth.sourceforge.net/userguide/tuts/specific-provider-wrapper.html
- https://login.yahoo.com/
- a mobile phone number is required to register a new account
- yahoo Application consumer key
- Not clear if the domain root URL can be used as redirect URI
- Using the domain root URL as redirect URI results in an error at the time of clicking the icon on the registered web site
- It is not possible to register inside Microsoft developper website a redirect URI similar to the one used for Google, because some caracteres are not accepted.
- one could try to make a simpler redirection URI which would redirect to the one simililar to the one used for Google.
- microsoft oauth2 application id
- Getting Your Client ID for Web Authentication
- https://account.live.com
- Mes applications
- https://developers.facebook.com/apps needs a phone number (sound or text) or a credit card
jessie (stable) | bpo | stretch (testing) | /usr/share/php/ | ||||
composer/composer | 2016-03-27 | b | # | composer | Composer | ||
hybridauth/hybridauth | 2016-01-12 | 2.6 | |||||
psr/log | 2012-12-21 | 1.0 | 1.0 | 1.0 | php-psr-log | Psr/Log | |
symfony/symfony | 2016-02-28 | 3.0 | 2.3 | 2.8 | php-symfony-framework-bundle | Symfony/Bundle/FrameworkBundle | |
https://packagist.org/packages/ | DebianPackage | /usr/share/php/ | |||||
https://packagist.org/packages/ | DebianPackage | /usr/share/php/ | |||||
https://packagist.org/packages/ | DebianPackage | /usr/share/php/ | |||||
https://packagist.org/packages/ | DebianPackage | /usr/share/php/ | |||||
https://packagist.org/packages/ | DebianPackage | /usr/share/php/ |
Drupal Modules
- Admin Toolbar
- Admin Toolbar
- [[span(title="Admin Toolbar improve...", Admin Toolbar)] ]
- [[span(title="Admin Toolbar improve...", Admin Toolbar)]]
- Tooltip example 1
Tooltip example 2h
"Tooltip 2g" Tooltip example 2g
"Tooltip 2h" Tooltip example 2h
Tooltip example 2e
Tooltip example 2f
Tooltip example 2c does not work
multiline` Tooltip example 2d
Tooltip example 4a
#!span title="Tooltip 2a" Tooltip example 2a
multiline tooltip
Tooltip example 3b }}}
D7 ordered | Drupal 8 | Drupal 7 | D8 ordered | |
---|---|---|---|---|
Core | ||||
Actions | ||||
Activity Tracker | ||||
Aggregator | ||||
Automated Cron | ||||
Ban | ||||
Block | ||||
Book | ||||
Administration | ||||
Administration menu | Admin Toolbar | |||
Admin Toolbar Extra Tools | ||||
Hybridauth
http://cgit.drupalcode.org/hybridauth/tree/README.txt?id=refs/heads;id2=7.x-2.x
Inside Drupal
Entities
- Introduced in Drupal 7
- An Introduction to Entities
- Entity API Tutorial
- Enties and Bundles in Drupal 7
- Understanding entity terminology
- Drupal 7 Entities: What are they, and what are they good for?
- https://www.drupal.org/project/bean