Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 10:01 am on April 13, 2015 Permalink | Reply  
    Categories: Announcements, Linux ( 7 )

    LAMP Stack for Humans – now available on Amazon 

    Lampstack-SoftcoverMy new book LAMP Stack for Humans is now available on Amazon. It this 284 page guide I’ll walk you through the process of turning an old laptop into an always-on server. You can use it to run web applications in the comfort of your own home or office – no “cloud” required.

    Together we will configure the entire server: you will learn how to install CentOS, Apache, PHP and MySQL (or MariaDB) and WordPress. I will show you how you can reach your server from other computers on the network and how to create regular backups.

    Perfect for the Linux newbie and those who want to get started with web applications without spending money “in the cloud” (in my opinion THE WORST expression for describing remote computers).

    If you’re an avid reader of this site and have always wished that some instructions would be presented in a more cohesive form rather than in snippets, then LAMP Stack for Humans is perfect for you.

     

    Grab your free sample today, or read the entire book for free via Kindle Unlimited!

     

     
  • Jay Versluis 12:46 pm on August 3, 2015 Permalink | Reply  
    Categories: Screencast, WordPress ( 64 )

    WordPress Screencast, Part 2: Writing Posts and Pages 

    In this video I’ll show you how to create posts and pages, and what the differences between them is. We’ll also discuss formatting and briefly how to use the HTML editor.

    The full course is aimed at beginners and medium casuals alike. Wether you’ve been away from WordPress for a while, or if you’re a complete newbie, this is a very un-intimidating “getting started” guide.

    I’ll release one episode every week on my iTunes Podcast Feed, or you can watch the full course on one convenient YouTube Playlist.

    Enjoy!

     
  • Jay Versluis 12:42 pm on July 27, 2015 Permalink | Reply  
    Categories: Screencast, WordPress ( 64 )

    WordPress Screencast, Part 1: Themes 

    In this video I’ll show what themes are and how to use them in WordPress (downloading, installing, activating and deleting). I’ll also show you how to preview themes before putting them live.

    Themes are what WordPress uses to style the look and feel of the front page. Depending on what theme you use, options in the back end may vary because some themes provide additional functionality (much like plugins). In this course I’m using TwentyThirteen.

     

    The full course is aimed at beginners and medium casuals alike. Wether you’ve been away from WordPress for a while, or if you’re a complete newbie, this is a very un-intimidating “getting started” guide.

    I’ll release one episode every week on my iTunes Podcast Feed, or you can watch the full course on one convenient YouTube Playlist.

    Enjoy!

     
  • Jay Versluis 4:35 pm on July 24, 2015 Permalink | Reply
    Tags: ,   

    Categories: Linux ( 68 )

    How to install Parallels Tools via the Command Line in CentOS 

    I like setting up barebones CentOS and other flavoured VMs on my Mac via Parallels Desktop. Trouble is, for such things like time synchronisation to work properly, something called Parallels Tools needs to be installed on each VM.

    This is to make sure Parallels Desktop can speak to the VM and communicate with it properly. It’s more important for GUIs so that the screen resolution and mouse handling is more accurate.

    Thing is, when you have a VM with a GUI, installing Parallels Tolls is extremely easy and may even happen automatically as soon as you install the OS. But if you have a command line only interface, it just doesn’t happen, and it’s up to us to install those tools manually. Here’s how to do it in CentOS.

    First, boot up your barebones VM and wait for it to start. Now head over to the VM’s menu and choose Actions – Install Parallels Tools. If they’re already installed, this message will change to “Reinstall Parallels Tools”.

    Screen_Shot_2015-07-21_at_16_39_13

    If your VM has a graphical user interface, this process will kick off the actual installation, but on barebones machines, it will merely attach the ISO image that contains the tools to your VM. In an ideal world, this tool would even mount the image for us, but sadly it doesn’t work with CentOS. Therefore we have a bit more work to do until we get to the installation part.

    You’ll see the following message to confirm the attachment:

    Screen-Shot-2015-07-21-at-16.29.35

    Now let’s login to our VM as root using our favourite SSH client (or simply use Parallels Desktop). We’ll create a directory to which we can mount the image. As suggested in the Parallels documentation, we’ll use /media/cdrom:

    mkdir /media/cdrom

    With this directory in place, let’s mount the ISO image to it so we can address it:

    mount -o exec /dev/cdrom /media/cdrom
    mount: block device /dev/sr0 is write-protected, mounting read-only

    The message is fairly self-explanatory: no writing to that ISO image. No problem! To start the installation, enter the directory and call the install script like so:

    cd /media/cdrom
    ./install

    The script will greet us with a TUI and some steps we need to complete, one of which may be that some additional components (such as make and gcc) need to be installed. That’s not always the case on barebones systems. Lucky for us, the script will take care of this for us too:

    Screen Shot 2015-07-21 at 16.33.51

    And that’s it! The script will finish fairly quickly, and at that point, Parallels Tools is installed in your VM. Congratulations! There’s only one final step: reboot the VM. You can either do that from the VM’s menu under Actions – Restart, or by issuing the following command:

    reboot now
    
    Broadcast message from root@yourserver
    (/dev/pts/0) at 16:53 ...
    
    The system is going down for reboot NOW!

    As soon as the VM is back up and running you’re all set :-)

    Screen Shot 2015-07-21 at 16.38.48

     

    Further Reading:

     
  • Jay Versluis 9:39 am on July 21, 2015 Permalink | Reply  
    Categories: Screencast, WordPress ( 64 )

    WordPress Screencast, Part 0: Introduction and Workflow 

    I thought it’s about time that I update my old WordPress course, and here’s the first instalment. I’ll talk you through WordPress 4.2. This part focusses on general workflow, how to log in, how WordPress works and how to use the integrated help system. I will also cover software updates for WordPress, Themes and Plugins.

    The full course is aimed at beginners and medium casuals alike. Wether you’ve been away from WordPress for a while, or if you’re a complete newbie, this is a very un-intimidating “getting started” guide.

    I’ll release one episode every week on my iTunes Podcast Feed, or you can watch the full course on one convenient YouTube Playlist.

    Enjoy!

     
  • Jay Versluis 4:28 pm on July 17, 2015 Permalink | Reply
    Tags: , ,   

    Categories: Plesk ( 66 )

    How to enable resuming FTP uploads in Plesk 

    Plesk uses ProFTP as the default FTP server. It has a handy feature that allows file uploads to resume or append should a connection be broken during transmission. This means that partially transferred data doesn’t have to be uploaded again, it can simply be added to – potentially saving a lot of time.

    Although easy to activate, this feature is not enabled by default on Plesk installations for security reasons. Here’s how to make it happen:

    Edit /etc/proftpd.conf and add the following few lines:

    # allow resuming file uploads
    AllowStoreRestart on
    AllowOverwrite on
    

    You may find the AllowOverwrite directive in there already, in which case replace it with the above block. For the changes to take effect, restart the xinetd service (of which proFTP is part):

    service xinetd restart
    

    Works on both CentOS 6 and CentOS 7.

    Note that for this to work, it also needs to be enabled in your FTP client. In FileZilla it’s under Settings – Transfers – File Exists Action:

    Screen-Shot-2015-04-09-at-12.40.26

     
  • Jay Versluis 9:33 am on June 15, 2015 Permalink | Reply
    Tags: , ,   

    Categories: Commodore ( 19 )

    How to split a long string into separate words in Commodore BASIC 

    Here’s a quick word splitter routine for CBM BASIC. It takes phrase and “explodes” all words into an array, removing spaces. Feel free to adopt it for your own needs.

    10 rem word splitter
    20 rem splits a long phrase into words at a space
    30 input "tell me something";a$
    40 rem clear current array of words
    50 for i=0 to 10: wd$(i)="": next: wd=1
    60 rem detect spaces
    70 for i=1 to len(a$)
    80 wd$(0)=mid$(a$,i,1)
    90 if wd$(0)=" " then wd=wd+1: next
    100 wd$(wd)=wd$(wd)+wd$(0): next
    110 print
    120 rem print all words
    130 for i=1 to 10
    140 if wd$(i)="" then 160
    150 print wd$(i)
    160 next
    

    Line 50 clears an array of 10 words called WD$(n). We also setup a word counter called WD. So in this example we can only detect a maximum of ten words. If you need more, you must DIM the array first.

    Lines 70 loops through all characters in our phrase. We make use of the first element in our array WD$(0) to store each single character. If it’s a space, we’ll increase the word counter and move on to the next character. If it’s not (line 80), then we’ll add this character to the current word which is stored in WD$(WD).

    The rest of the code simply prints each word on a new line to see our handy work.

     
  • Jay Versluis 8:57 am on June 2, 2015 Permalink | Reply
    Tags: ,   

    Categories: Mac OS X ( 18 )

    How to kill the “accept incoming connections” dialogue on your Mac forever 

    Screen Shot 2015-06-02 at 08.28.12Have you ever come across the above dialogue, asking if you’d like to “accept incoming network connections” on your Mac? It’s caused by the Firewall and it’s meant to be helpful. Because if you have an app that needs incoming network connections all the time, you can just add them to the Firewall rules (under System Preferences – Security – Firewall).

    But of course, it doesn’t always work. Some apps get updated and this message starts appearing out of the blue, no matter if it hasn’t happened before or if you’ve manually added said app to the Firewall rules a thousand times already. God only knows whatever is upsetting our precious operating system, but it’s driving us all nuts.

    Help is at hand: turns out these messages are caused by some certificate issue I genuinely do not care to know about – nor should I have to. Here’s a “relatively easy” way to fix it once and for all. There are other ways which involve more typing, or switching off the Firewall altogether, but the following is by far the quickest option in my opinion:

    • open a Finder window and navigate to the app in question (usually in Applications, potentially in a subfolder)
    • open a Terminal Session (under Applications – Utilities – Terminal)
    • type cd followed by a space
    • from the Finder window, drag the folder in which your app resides into the Terminal window
    • hit return (this will put you into the same directory as your app)
    • type the following scary line of code:
    sudo codesign --force --deep --sign - ./YourApp.app
    

    Replace “YourApp.app” with the actual name of the app, including the .app extension. You will be prompted for your password and in a few moments you should see a message such as “replacing existing signature”. With this code your Mac will have created a self-signed ad-hoc certificate, re-signing the app.

    Don’t worry if this doesn’t sound English, all it means is that we’re telling the operating system (or rather, Keychain Access) that “the Administrator says it’s OK to trust this app”.

    Now launch your app again. Don’t be dismayed when you see that annoying “accept incoming connections” dialogue again – it’ll be the last time. Select “allow” and you’re done with this – hopefully for good. Try it out by closing your app and restart it again. Celebrate about not seeing that message again.

    Kudos to ahall over on Stack Exchange for this tip! It’s made me a much happier person again :-)

     
  • Jay Versluis 9:33 am on May 21, 2015 Permalink | Reply
    Tags:   

    Categories: Mac OS X ( 18 )

    How to reset the PRAM (or NVRAM) on your Mac 

    On a recent chat with Apple support, the representative suggested I reset my PRAM. From what I understand this will clear BIOS like values that may cause a Mac to malfunction. It only takes a second to do – here’s how:

    Press CMD+OPTION+P+R, then start the system. You’ll need three hands or a portable keyboard to do it.

    Hold those four keys down until you hear a second startup chime (or if you’ve previously disabled in, until you hear one chime).

    That’s it!

    Note that there are technical differences between the PRAM, NVRAM and the SMC, but I really don’t know what they are. You can reset them all to make your Mac behave if it’s doing weird things though.

     
  • Jay Versluis 7:34 am on May 20, 2015 Permalink | Reply
    Tags:   

    Categories: Mac OS X ( 18 )

    How to start Mac OS X Yosemite in Safe Mode 

    Hold down SHIFT during normal boot, until the loading bar appears. It will take longer than usual to start the system. Some services are not available.

    Safe Mode will clear several caches and verify the startup disks.

    From the command line, or on remote systems, boot into Safe Mode using this:

    sudo nvram boot-args="-x"
    

    When you want to boot into “normal” mode again, change the startup parameters to nothing:

    sudo nvram boot-args=""
    

    Very handy article from the Apple Knowledge Base:

     
  • Jay Versluis 9:55 am on May 3, 2015 Permalink | Reply
    Tags:   

    Categories: Linux, Plesk ( 68 )

    How to update Plesk via the Command Line 

    Plesk-LogoYou can update Plesk via the Web Interface (under Tools and Settings – Updates and Upgrades). However sometimes the interface times out, or browsers get confused – therefore it’s good to know that you can apply updates via the command line interface as well. In this article I’ll show you how (in Linux – I don’t know much about running Plesk on Windows I’m afraid).

    We need to download the standard installer script for this. It’s a powerful little tool which can also be used to add or remove components from the current Plesk installation, or to install Plesk on a barebones server.

    As of 2015 the link can be found here:

    Screen Shot 2015-05-03 at 09.39.40

    If you click the option “Download Plesk installer for Linux”, you’ll see the actual script open in a new browser tab. Not what we want, although you could copy and paste this into a new file on your Linux system. Instead, right-click on the link and choose “Copy Link” instead.

    Screen Shot 2015-05-03 at 09.41.27

    With that link in your clipboard, connect to your server via SSH and download the file with something like wget:

    wget http://autoinstall.plesk.com/plesk-installer?long-url-here
    

    This will result in a file called “plesk-installer” with some nasty parameters at the end, several hundred characters in total. Let’s rename it to something easier and tweak the execution permissions:

    mv plesk-installer* plesk-installer
    chmod +x plesk-installer
    

    Now we can run the script like so:

    ./plesk-installer
    
    Welcome to the Parallels Installation and Upgrade Wizard!
    ===============================================================================
    
    This wizard will guide you through the installation or upgrade process. Before
    installing or upgrading Parallels products, be sure to back up your data.
    
    To start the installation or upgrade, press N and then press Enter.
    To quit the installer, press Q and then press Enter.
    

    Follow the instructions to upgrade Plesk. You can also call the script with several options, for a full list of those call it with “–help”. To see all available versions of Plesk during the installation, use “–all-versions”, which will eventually lead you to a screen similar to this:

    Select the desired products and their versions
    ===============================================================================
    
    The following product versions are available:
    
    1. [*] Parallels Plesk
      2. ( ) Parallels Plesk Panel 12.1.21 (testing)
      3. ( ) Parallels Plesk Panel 12.1.20 (testing)
      4. ( ) Parallels Plesk Panel 12.1.19 (testing)
      5. ( ) Parallels Plesk Panel 12.1.18 (testing)
      6. ( ) Parallels Plesk Panel 12.1.17 (testing)
      7. ( ) Parallels Plesk Panel 12.1.16 (testing)
      8. ( ) Parallels Plesk Panel 12.1.15 (testing)
      9. ( ) Parallels Plesk Panel 12.1.14 (testing)
      10. ( ) Parallels Plesk Panel 12.1.13 (testing)
      11. ( ) Parallels Plesk Panel 12.1.12 (testing)
      12. ( ) Parallels Plesk Panel 12.1.11 (testing)
      13. ( ) Parallels Plesk Panel 12.1.10 (testing)
      14. ( ) Parallels Plesk Panel 12.1.9 (testing)
      15. ( ) Parallels Plesk Panel 12.1.8 (testing)
      16. ( ) Parallels Plesk Panel 12.1.7 (testing)
      17. ( ) Parallels Plesk Panel 12.1.6 (testing)
      18. (*) Parallels Plesk 12.0.18 (Stable) (currently installed)
    
    N) Go to the next page; P) Go to the previous page; Q) Cancel installing
    To select a version, type the respective number;
    Select an action [N]: 
    

    If you call the script without any parameters, only micro updates and additional components are applied. Micro updates are usually applied automatically if this feature is enabled (it is by default).

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel