-
git clone https://github.com/wadmiraal/docker-drupal.git
-
cd docker-drupal
-
git checkout 7.x
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
function tableToJson(table) { | |
var data = []; | |
// first row needs to be headers | |
var headers = []; | |
for (var i=0; i<table.rows[0].cells.length; i++) { | |
headers[i] = table.rows[0].cells[i].innerHTML.toLowerCase().replace(/ /gi,''); | |
} | |
// go through cells |
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
DROP TABLE currency; | |
-- Create table variable | |
CREATE TABLE currency ( | |
name VARCHAR(20), | |
code VARCHAR(3), | |
symbol VARCHAR(5) | |
); | |
ALTER TABLE currency CONVERT TO CHARACTER SET utf8; |
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
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))" |
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
# Danish "CVR-nummer". | |
# | |
# A 7 digit serial number followed by a mod-11 check digit: | |
# https://erhvervsstyrelsen.dk/modulus-11-kontrol | |
# | |
# Search for real CVRs, to see examples: https://datacvr.virk.dk/data/ | |
# E.g. 35408002, 30715063. | |
class DanishOrganizationNumber | |
MOD_11_WEIGHTS = [ 2, 7, 6, 5, 4, 3, 2 ] |
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
alias psql2markdown=" sed 's/+/|/g' | sed 's/^/|/' | sed 's/$/|/' | grep -v rows | grep -v '||'" |
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
package generator | |
// This code is based on this stackoverflow answer:http://stackoverflow.com/questions/12458852/load-emf-model-instance-in-xtend | |
import org.eclipse.emf.common.util.URI | |
import org.eclipse.emf.ecore.resource.Resource | |
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl | |
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | |
import org.eclipse.emf.ecore.EPackage |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" | |
version="1.0"> | |
<!-- derby --> |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |