curl https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
curl -L https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh > /tmp/nvm-install.sh && bash /tmp/nvm-install.sh
# This demonstrates how you can provide a custom template for the Content-Type. | |
# In this example this would be a POST of Content-Type: application/xml | |
functions: | |
parseXml: | |
handler: handler.parseXml | |
memorySize: 128 | |
events: | |
- http: | |
path: "/angler" | |
method: post |
const seriesResults = []; | |
// Original. | |
for (const key in series.data) { | |
const seriesID = parseInt(series.data[key].athlinks_series_id, 10); | |
// Load Series information from the db. | |
seriesResults.push(this._retrieveSerieInfoDynamodb(seriesID)); | |
} | |
// Option 1 | |
series.data.map(seriesDataItem => { |
SELECT table_schema "DB Name", ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" \ | |
FROM information_schema.tables \ | |
GROUP BY table_schema; |
$config['search_api.server.solr_server']['backend_config']['connector_config']['host'] = 'my-new-host.com';
rig project run drupal "debug:config search_api.server.solr_server --show-overridden"
SELECT table_name AS "Tables", ROUND(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = DATABASE() AND (data_length + index_length) > ${SIZE} ORDER BY (data_length + index_length) DESC; | |
# This will describe all tables at once. | |
mysql -N -u${DB_USER} -p${DB_PASSWORD} ${DB_URL} --execute="show tables" | while read table; do mysql -u${DB_USER} -p${DB_PASSWORD} ${DB_URL} --execute="describe $table \G"; done | |
# Dump each table individually with a limit | |
mysql -N -h ${DB_URL} -u${DB_USER} -p${DB_PASSWORD} ${DATABASE} --execute="show tables" | while read tablename; do mysqldump -h ${DB_URL} -u${DB_USER} -p${DB_PASSWORD} --where="1=1 LIMIT 10" ${DATABASE} $tablename > $tablename.sql; done | |
# Dump the first $N number of rows from each table in a single dump | |
docker run --name mysqldump -it --rm --entrypoint=mysqldump outrigger/mariadb:10.2 -h ${DB_URL} -u${DB_USER} -p${DB_PASSWORD} --opt --where="1=1 LIMIT ${N}" ${DATABASE} | gzip > ${DATABASE}_$(date +%Y-%m |
^(?!.*develop|.*master|.*wip).*$ | |
:^((?!develop).)*$ |
# Varnish v4.0 | |
# Clear varnish cache | |
varnishadm "ban req.url ~ .*" | |
# Example debug for vcl file | |
std.log("X-AH-Redirect is: " + X-AH-Redirect); | |
# Tail logs for any debug lines in a VCL | |
varnishlog -i VCL_Log |
# Find db container ID | |
DB_CONTAINER_ID=$(docker inspect --format"{{.Id}}" CONTAINER_NAME) | |
# Path to current log file for container | |
LOG_PATH=$(docker inspect -f '{{.LogPath}}' CONTAINER_NAME) |
Add: | |
{ | |
"type": "composer", | |
"url": "https://asset-packagist.org" | |
}, | |
# Remove: "drupal/core": "~8.3" | |
# Change: "acquia/lightning": "~2.1.0" | |
# Remove: "drupal/video_embed_field": "^1.5" | |
# Remove: "drupal/image_widget_crop": "2.1" |