V mount battery test

Earlier this year I decided to compare some of the V-mount batteries available and see what the differences were. Some of it was rather eye opening, and since then I’ve expanded on the original article and have now created a dedicated page for batteries - listing all their specs, including crucially, their relative capacities versus their size and weight.

redirect https and without www

Enabling HTTP Secure (HTTPS)
Last updated 4 August 2018. Created on 11 November 2009.
Edited by John Morahan, hiten2112, marcoka, Joel MMCC. Log in to edit this page.

HTTPS is a protocol which encrypts HTTP requests and their responses. This ensures that if someone were able to compromise the network between your computer and the server you are requesting from, they would not be able to listen in or tamper with the communications.

Wireless microphones and monitors frequencies Ofcom

Wireless microphones and monitors
11 May 2015
Wireless microphones and in-ear monitors in the UK are generally available at VHF (170 - 210 MHz) and UHF (470 - 790 MHz).

There are three ways in which you can legally use them:

The ranges 173.8 - 175 MHz and 863 - 865 MHz and 2400 - 2483.5 MHz can be used without a Licence subject to the requirements of The Wireless Telegraphy (Exemption) (Amendment) Regulations 2006. These ranges are also used by other low power equipment so can be subject to interference.


There is a long-running battle between Linux users about which command line editor is the best. In one camp vi is the editor that rules the roost but in another, it is all about emacs.

For the rest of us who just need something simple to use to edit files there is nano. Don't get me wrong vi and emacs are very powerful editors but sometimes you just need to open, amend and save a file without remembering the keyboard shortcuts.

Run cron in WHM

No, you cannot set a cron job from WHM. If you have to set a cron server side, you will have to configure it via SSH as user "root". SSH to your server and execute:

crontab -e
This will edit the root's cronjob file at /var/spool/cron/root. Set the cronjob you like and restart the crond service.

service crond restart

htaccess redirects

Useful 301 Redirects for SEO using .htaccess
Written by Creare - Published on May 8, 2014
It is well known that 301 Redirects are vital for recovering link equity from URLs that are no longer existing on our current website but were available on a previous version.

This usually occurs when migrating a website from one domain to another or perhaps even updating a website to use a new system or framework where the previous URL structure cannot be effectively replicated.

Log in with an SSH private key on Linux and Mac

This example demonstrates how to use a private key to log in to a Linux server by using a private key by using a Terminal session on OS X. However, you can follow the same process to use a private key when using any terminal software on Linux.

Note: For information about using SSH private keys on Windows operating systems, see Logging in with an SSH Private Key on Windows.

To complete this process, you need the following software applications:

Overcoming memory issues installing Drupal with Composer

Tue, 27/03/2018 - 16:34 -- James Oakley

Drupal 8 uses Composer for package management. You can still install a Drupal 8 site by downloading a tarball, but we're all encouraged to use Composer to download Drupal core and other dependencies and to keep things up to date.

I'm just starting to get my head around how Drupal 8 works, so that I can reach the point where I can build new sites in 8.x rather than 7.x, and in time migrate existing sites over. Composer is part of the learning curve for this.

Download Composer to Mac OSX

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Increase CLI php memory limit on OSX

published by Albert Skibinski on Sat, 2015-02-21 13:52
When running MAMP or MAMP Pro on a Mac OSX (this is on version 10 Yosemite) you will notice that PHP executed from the command line (CLI) will use different PHP settings than your website. In this case, OSX is using its own built-in apache server and php settings, not the ones defined by your MAMP setup.

You can easily change this though, as long as you know which php.ini to change.

First, check your memory limit, by running the following command on your SSH shell or local terminal:

Mac show hidden files

The long way to show hidden Mac OS X files is as follows:
Open Terminal found in Finder > Applications > Utilities.
In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES.
Press return.
Hold the 'Option/alt' key, then right click on the Finder icon in the dock and click Relaunch.

Drupal 8 update

# Before you begin
It's recommended to use Composer to manage Drupal dependencies; read Using Composer with Drupal for more information. Drush 9 no longer supports updating Drupal and leaves the work to composer. Hence it is recommended to use Composer to update Drupal. However, if you are a long-time Drush user, you may still use Drush 8 (8.14 or newer) to update Drupal 8.

PS! The introduction to these instructions summarizes all your update options to choose from.

Always revert to a backup when you get a fatal error in update process.

How to Increase Import Size Limit in phpMyAdmin

If you are using WHM/Cpanel then in order to change that "Max: 50MiB" limit in the import section of phpmyadmin, you will have to change two values in WHM (Web Host Manager).

Step 1) Go to Tweak settings, find the "cPanel PHP Max upload size" change it according to your needs. Save changes.

Step 2) Go to Tweak settings, find the "cPanel PHP Max POST size" change it according to your needs. Save changes.

Go back to your phpMyadmin. The value should have changed.

mismatched entity and/or field definitions The node.field_flexslider_example_slidesh field needs to be uninstalled.

Comment #60osman CreditAttribution: osman as a volunteer commented 2 years ago
If you have Devel module installed, you can also use the "Execute PHP Code" page at http;//example.com/devel/php

try {
catch (EntityStorageException $e) {

Z90 focus

When you want to track a slow-moving
subject but other subjects or people appear
in the foreground.


Portier is an email-based, passwordless authentication service
that you can (but don't have to) host yourself.


You don’t know what you’re missing
without session replay.
FullStory records and reproduces real user experiences on your site helping you support customers, boost conversions, and debug faster.


Why bother with doing a database. You can write a JavaScript function that you run and receive a response from by hitting a URL

The provided host name is not valid for this server.

This error message is coming a feature that was added to Drupal 8 to protect against HTTP Host header attacks. The feature is also described in the change record that was generated for the patch.

Essentially, is was possible to spoof the HTTP Host header for nefarious purposes, and trick Drupal into using a different domain name in several subsystems (particularly link generation). In other words, the HTTP Host header needs to be considered user input, and not trusted.

Twig reference


{% (this is a block) %}
${ (this is an expression) }
${ this_is_also_a_variable }
${ variable | this_is_a_filter("and", "these are", arguments) }
this == is + an ~ "expression"
{# this is a comment, and is removed when the template is built #}

Block Twig

down vote

In a block twig you can access a field value like this:

{{ content['#block_content'].field_myfield.value }}

This is the database value of the field.

Most times you want to render a field:

{{ content.field_myfield }}

This will display the field as it is configured in the view mode.

Views D8 suggestions

Describes various views templates & overriding options.

All views templates can be overridden with a variety of names, using the view, the display ID of the view, the display type of the view, or some combination thereof.

For each view, there will be a minimum of two templates used. The first is used for all views: views-view.html.twig.

Taxonomy term view mode suggestion

You need to use underscores in your suggestion (but continue to use dashes in your template file name):

function linkup_theme_suggestions_taxonomy_term_alter(&$suggestions, $vars, $hook) {
if($vars['elements']['#view_mode'] == 'teaser') {
$suggestions[] = 'taxonomy_term__teaser'; // note underscores
you could also leave out your condition and do:

function linkup_theme_suggestions_taxonomy_term_alter(&$suggestions, $vars, $hook) {
$suggestions[] = 'taxonomy_term__' . $vars['elements']['#view_mode'];

Twig |length filter

New in version 2.3: Support for the __toString() magic method has been added in Twig 2.3.

The length filter returns the number of items of a sequence or mapping, or the length of a string.

For objects that implement the Countable interface, length will use the return value of the count() method.

For objects that implement the __toString() magic method (and not Countable), it will return the length of the string provided by that method.

{% if users|length > 10 %}
{% endif %}