This file contains 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
api = 2 | |
core = 7.x | |
projects[drupal][type] = core |
This file contains 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 | |
COMMAND=$1 | |
if [ -z $1 ]; then | |
COMMAND="status" | |
else | |
COMMAND="$@" | |
fi | |
for repo in `find . -maxdepth 1 -mindepth 1 -type d` |
This file contains 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 | |
$conn = new mysqli('localhost', 'root', 'root', 'database'); | |
if (mysqli_connect_errno()) { | |
printf("Connect failed: %s\n", mysqli_connect_error()); | |
exit(); | |
} | |
$conn->autocommit(FALSE); | |
$preserve = array( |
This file contains 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 | |
/** | |
* Sample script to convert an CSV (ie. exported form MS Excel file) into | |
* RDF SKOSXL format. | |
* | |
* @file csv2skosxl.php | |
* @license Licensed under WTFPL (http://www.wtfpl.net/txt/copying/) | |
* @author Cristian Romanescu <[email protected]> | |
*/ |
This file contains 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
# https://goldmann.pl/blog/2014/07/30/running-docker-containers-as-systemd-services/ | |
[Unit] | |
Description=MariaDB container | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
User=php | |
Restart=always |
This file contains 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
[client] | |
user=root | |
password=root | |
socket=/var/mysql/mysql.sock | |
[mysqld] | |
# Remove leading # and set to the amount of RAM for the most important data | |
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. | |
# innodb_buffer_pool_size = 128M |
This file contains 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
FileETag MTime Size | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access 1 month" | |
ExpiresByType text/html "access 1 month" | |
# CSS | |
ExpiresByType text/css "access 1 year" | |
ExpiresByType application/javascript "access 1 year" |
This file contains 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
List tests classes by group | |
php core/scripts/run-tests.sh --list | |
Normal run of a single class | |
php core/scripts/run-tests.sh --non-html --color --verbose --url http://site.local --class "Drupal\Tests\my_module\Functional\ClassTest" | |
Debug a single class (leave results) | |
php core/scripts/run-tests.sh --die-on-fail --keep-results-table --keep-results --non-html --color --verbose --url http://site.local --class "Drupal\Tests\my_module\Functional\ClassTest" |
This file contains 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
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX nm: <http://nomisma.org/id/> | |
PREFIX nmo: <http://nomisma.org/ontology#> | |
PREFIX org: <http://www.w3.org/ns/org#> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#> | |
SELECT ?s ?y |
This file contains 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
select concat('http://your.website.url/', c.langcode, c.alias) url from node a | |
inner join node_field_data b on a.nid = b.nid | |
inner join url_alias c on CONCAT('/node/', a.nid) = c.source AND c.langcode = 'en' | |
where b.status = 1 group by a.nid | |
UNION | |
select concat('http://your.website.url/', c.langcode, c.alias) url from node a | |
inner join node_field_data b on a.nid = b.nid | |
inner join url_alias c on CONCAT('/node/', a.nid) = c.source AND c.langcode = 'fr' | |
where b.status = 1 group by a.nid |
OlderNewer