All posts by smarc

Run Multiple Domains with One WordPress Instance

Option 1: Explicitly Define the Domains

if ($_SERVER['HTTP_HOST'] == 'www.mywebsite.com') {
    define('WP_SITEURL', 'http://www.mywebsite.com');
    define('WP_HOME',    'http://www.mywebsite.com');
} else {
    // this is the default that shows up if someone visits your site
    define('WP_SITEURL', 'http://www.mywebsite.net');
    define('WP_HOME',    'http://www.mywebsite.net');
}

Source: Run Multiple Domains with One WordPress Instance – WPLauncher

Coin Specifications

Coin Specifications

How much does a dime weigh? What are pennies made of? Find out in the table below, which gives specifications for U.S. Mint legal tender coins presently in production for annual sets. Specifications for the American Innovation $1 Coins and Native American $1 Coins are the same.

The penny, dime, quarter, half dollar, and dollar are clad coins. Clad coins have an inner core of metal surrounded by an outer layer of a different metal. The Mint makes clad coins with an inner core of copper. The nickel is the only circulating coin that isn’t clad.

Denomination Cent Nickel Dime Quarter Half Dollar Dollar
Composition Copper Plated Zinc

2.5% Cu
Balance Zn

Cupro-Nickel

25% Ni
Balance Cu

Cupro-Nickel

8.33% Ni
Balance Cu

Cupro-Nickel

8.33% Ni
Balance Cu

Cupro-Nickel

8.33% Ni
Balance Cu

Manganese-Brass

88.5% Cu
6% Zn
3.5% Mn
2% Ni

Weight 2.500 g 5.000 g 2.268 g 5.670 g 11.340 g 8.1 g
Diameter 0.750 in.
19.05 mm
0.835 in.
21.21 mm
0.705 in.
17.91 mm
0.955 in.
24.26 mm
1.205 in.
30.61 mm
1.043 in.
26.49 mm
Thickness 1.52 mm 1.95 mm 1.35 mm 1.75 mm 2.15 mm 2.00 mm
Edge Plain Plain Reeded Reeded Reeded Edge-Lettering
No. of Reeds N/A N/A 118 119 150 N/A

Source: Coin Specifications

Ubuntu/Linux Mint – Brother QL-800 Label Printer

First thing first, leave the USB off. When you first plug in the power, if the “Editor Lite” light is on, then hold the button until it turns off. Editor Lite causes it to mount as a mass storage device and not as a printer.

Next up, download the drivers from Brother’s website: https://support.brother.com/g/b/producttop.aspx?c=ca&lang=en&prod=lpql800eus or via my local mirror (ql800pdrv-3.1.5-0.i386.deb).

Install the usual way:

sudo dpkg -i ql800pdrv-3.1.5-0.i386.deb

This will add the drivers and add a new printer. If you get any /var/spool/lpd errors, try making the right directory ahead of time and re-install the deb file.

sudo mkdir -p /var/spool/lpd/ql800

Plug in that USB. Check in Printers or via the CUPS interface (http://localhost:631/printers/). The device URI should look something like usb://Brother/QL-800?serial=000W0H924252.

If you run into problems (check via dmesg or jounalctl -f), it could be a udev rule that you’re missing. Try adding a new udev rule, changing the Serial number (find that out via “dmesg | grep Serial” when first plugging the USB in).

sudo vi /etc/udev/rules.d/10-brother-printer.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="209e", ATTRS{serial}=="000W0H924252", MODE="0664", GROUP="lp", SYMLINK+="usb/lp0"

Then restart udev and cups:

sudo udevadm control -R
sudo service cups restart

If you’re installing some other Brother, the vendor code should be good but you’ll need to replace the Product ID (209e) with your own. You can find this out by running “lsusb” (check the bold for the product ID).

Bus 003 Device 019: ID 04f9:209b Brother Industries, Ltd QL-800 P-touch Label Printer

Bonus! Using brother_ql – the Python package to control your Brother printer from the command line

Download and install from the website https://pypi.org/project/brother-ql/.

This should add it to the path (if not, the binaries should be in ~/.local/bin/brother_ql)

This next part you’ll need to figure out. I am using DK-1201 labels which are 29mmx90mm. I created a sample.png file which was exactly 306×991 pixels for testing. So my command line looks like this:

brother_ql --backend pyusb --model QL-800 --printer 'usb://0x04f9:0x209b/000W0H924252' print -l 29x90 sample.png

Note the change in the USB string — replace those with your product ID (if not QL-800) and serial number.

Source: Ubuntu/Linux Mint – Brother QL-800 Label Printer | 10pm.ca – Tidbits for the wandering Googler

OctoPi/OctoPrint Change Webcam Resolution | 10pm.ca – Tidbits for the wandering Googler

OctoPi/OctoPrint Change Webcam Resolution


You can change the webcam’s resolution via the cmd line on OctoPrint by

sudo vi /boot/octopi.txt

And adding this to the file:

camera="usb"
camera_usb_options="-r 1280x720 -f 10"

You can get a list of the supported resolution via (may need v4l-utils installed):

v4l2-ctl -d /dev/video0 --list-formats-ext 

and then reboot the pi