function isNode () { | |
return Object.prototype.toString.call( typeof process !== 'undefined' ? process : 0 ) === '[object process]' | |
} |
# http://raspberrypi.stackexchange.com/questions/311/how-do-i-backup-my-raspberry-pi | |
diskutil list | |
# backup: | |
sudo dd if=/dev/disk2 of=raspberrypi20151118.img bs=1m | |
# restore: | |
dd if=sd.img of=/dev/sdb bs=4M |
> via https://raspberrypi.stackexchange.com/questions/311/how-do-i-backup-my-raspberry-pi | |
With gzip, to save a substantial amount of space: | |
sudo dd if=/dev/rdiskx bs=1m | gzip > /Users/tmorrow/Documents/rpi0-arch.gz | |
And, to copy the image back onto the SD: | |
gzip -dc /path/to/backup.gz | sudo dd of=/dev/rdiskx bs=1m |
#http://learningthings.info/index.php/2016/06/24/learning-to-format-a-sd-card-as-fat32-using-mac-command-line/ sudo diskutil eraseDisk FAT32 SDCARD MBRFormat /dev/disk2
https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
Moving process (p.s. If you've already installed WP in subdirectory, some steps might be already done automatically).
Create the new location for the core WordPress files to be stored (we will use /wordpress in our examples). (On linux, use mkdir wordpress from your www directory. You'll probably want to use chown apache:apache on the wordpress directory you created.) Go to the General Screen. In WordPress address (URL): set the address of your main WordPress core files. Example: http://example.com/wordpress In Site address (URL): set root directory's URL. Example: http://example.com
Hardware used was Raspberry Pi 3 B+
Almost followed this entire guide: https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/5
(with minor changes)
# SSH from the Mac to the Pi with | |
# -Y: X-11 (trusted) forwarding | |
# -L VNC forwarding | |
ssh -Y -L 5901:localhost:5901 [email protected] | |
# (in SSH session) | |
# Create VNC password | |
x11vnc -storepasswd |
#!/bin/sh | |
# invoke global X session script | |
#. /etc/X11/Xsession | |
# HOW-TO : | |
# 1. Disable any Display Manager (lightdm/gdm/gdm3) from executing on startup | |
# 2. Allow user to start X : | |
# a. Edit /etc/X11/Xwrapper.config | |
# b. Set value : "allowed_users=anybody" | |
# 3. insert "su kiosk -c xinit &" into /etc/rc.local |
const numbers = [10, 20, 30, 40] // sums to 100 | |
// function for adding two numbers. Easy! | |
const add = (a, b) => | |
a + b | |
// use reduce to sum our array | |
const sum = numbers.reduce(add) |