wiki:members/GRIP-UQAM

Version 99 (modified by Grip Uqam, 8 years ago) ( diff )

--

TranslatedPages

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

Tickets we follow

Taged with GRIP-UQAM

Results (1 - 10 of 21)

1 2 3
Ticket Modified Resolution Owner Summary
1 2 3

Taged with python, tendenci, django, pyramid, php, drupal7, drupal, golang, fastcgi, chelsea, ossie

Results (1 - 10 of 1097)

1 2 3 4 5 6 7 8 9 10 11
Ticket Modified Resolution Owner Summary
1 2 3 4 5 6 7 8 9 10 11

Reported by us

No results

Taged with GRIP-UQAM with description

Results (1 of 21)

1 2 3 4 5 6 7 8 9 10 11
Ticket Modified Resolution Owner Summary
1 2 3 4 5 6 7 8 9 10 11

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)>
    
  • -E or --echo-hidden See SQL requests send by psql for commands like \l (\list)
    $ psql --echo-hidden --dbname postgres
    
  • 15 Practical PostgreSQL Database Administration Commands
  • Root Password
    $ sudo -u postgres psql postgres
    ALTER USER postgres WITH PASSWORD '<password>';
    \q
    
  • 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

Database Clients

Git

Json

.json validator

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
  • $ ls bower_components/
  • or
  • $ ls ../../web/sites/all/libraries

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

Some Composer commands

  • $ ./composer.phar self-update --stable
    
  • $ ./composer.phar update
    

Composer extensions

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"
    }
}

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>

Using symlinks to avoid duplication of code and save server memory

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>

Drupal 8 requirements and particularities

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)

Note Altern-C

To keep in mind

4875 id=4875 No results No results No results No results

drupal.org followup

JavaScript Libraries

http://www.sitepoint.com/11-best-jquery-charting-libraries

PHP Libraries

hybridauth/hybridauth

http://hybridauth.sourceforge.net/userguide.html

$ composer require hybridauth/hybridauth

Google::

  • easy

LinkedIn::

  • easy

OpenID::

  • easy (no secret information needed)

Yahoo OpenID::

Microsoft Live::

  • 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

Facebook

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

Tooltip example 2b

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 3a

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

simplenews

Inside Drupal

Entities

Drupal 8

HTML Slides

Radical Servers

SQL Database Programming

SQL

Views

Supported features

Data Types

json
XML
  • Seems not yet to be in Firebird

Embedded Database Programming

sqlite

Postgres

Performance

Timing

Procedural Language

General information and Feature Lists

Release Notes and Documentation

MySQL

Firebird

Java Programming

PHP Security Programming

PHP Programming

Symfony Programming

EZ Plateform

Note: See TracWiki for help on using the wiki.