Profession/Role:
Current Projects/Challenges:
Specific Interests:
Values and Principles:
Download PDFJS prebuilt version from https://mozilla.github.io/pdf.js/getting_started/#download
Unzip the file to 'pdfjs' folder and move it to the BookStack app 'public' folder. Ensure both 'build' and 'web' folders and its files are there.
Copy and paste the following code to Custom HTML Head Content field on Settings page:
title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt
<?php | |
/** | |
*The numbers are normally composed of three parts: | |
* - 1 or 2 digits for Drupal core compatibility (Drupal 8, 9, 10, etc.). This | |
* convention must be followed. | |
* - 1 digit for your module's major release version; for example, for 8.x-1.* | |
* use 1, for 8.x-2.* use 2, for Core 8.0.x use 0, and for Core 8.1.x use 1. | |
* This convention is optional but suggested for clarity. |
<?php | |
/** | |
* @file | |
* Contains various helper functions. | |
*/ | |
use Drupal\taxonomy\Entity\Term; | |
/** |
$new_term = \Drupal\taxonomy\Entity\Term::create([ | |
'vid' => 'example_vocabulary_machine_name', | |
'name' => 'Example term name', | |
]); | |
$new_term->enforceIsNew(); | |
$new_term->save(); |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
#!/bin/bash | |
# Shell script to backup MySQL database | |
# Set these variables | |
MyUSER="" # DB_USERNAME | |
MyPASS="" # DB_PASSWORD | |
MyHOST="" # DB_HOSTNAME | |
# Backup Dest directory | |
DEST="" # /home/username/backups/DB |
#!/usr/bin/env python | |
""" | |
A simple command line script to count the number of records returned by an OAI-PMH provider | |
OAI-PMH protocol documentation: https://www.openarchives.org/OAI/openarchivesprotocol.html | |
To install dependencies: | |
pip install lxml requests beautifulsoup4 |