Category: How To Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 12:54 pm on July 12, 2018 Permalink | Reply
    Tags: EPUB, Kindle, MOBI   

    Categories: How To, WordPress ( 145 )   

    How to share ebooks with WordPress (EPUB and MOBI files) 

    If you’ve ever tried to upload an ebook in .MOBI or .EPUB format with the WordPress Media Uploader, you will have noticed an error message appear. Something along the lines of “Sorry, this file type is not permitted for security reasons”.

    The only way then appears to be to ZIP the file and share it. That’s not a great experience for mobile users, who would simply like to click on a file and open it in an application such as iBooks or Kindle.

    The solution to this puzzle lies in adding the required mime types to WordPress, so that these file types are allowed.

    Let me show you how to do it in this article.

    (More …)





     
  • Jay Versluis 9:46 am on May 23, 2018 Permalink | Reply
    Tags: ,   

    Categories: How To   

    Fan Maintenance on my Samsung NC10 

    My Samsung NC10 Netbook has been in constant operation since 2013, for 24 hours a day, 7 days a week. It’s doing a great job as our internal office server, purring along quietly running CentOS 6.

    When I put it in operation 5 years ago, I made sure no mechanical parts we being used anymore to avoid wear and tear: I’ve added an SSD, and once a day valuable data is backed up on a permanently mounted SD card.

    The only mechanical thing still in use is the internal fan. I knew the day would come on which the poor thing would either give up and need replacing, or at least require some maintenance to make it go a few extra miles. Well, that day has come at the beginning on this month, when I noticed a bit of rattling noise that started happening behind my big monitor. That’s where I keep the little guy.

    Turns out that the fan can be easily whipped back into shape with a drop of bicycle oil. It’s really easy to disassemble too – let me show you how I did it.

    (More …)





     
  • Jay Versluis 8:45 am on May 11, 2018 Permalink | Reply
    Tags:   

    Categories: How To   

    How to remove OSSEC Agent on macOS Sierra 

    I’ve been trying to find a way to remove OSSEC on one of my Macs. Most documentation is a bit outdated and references files from yesteryear, so here’s how to do it on macOS Sierra in 2018.

    These instructions were written with OSSEC 2.8 in mind. I’m not familiar with later versions.

    Removing the three system users

    The OSSEC Agent creates three system users that come up when your Mac is started. They’re called ossec, ossecm and ossecr. OSSEC uses these to run its various scrips and services.

    To remove them on macOS, head over to System/Library/CoreServices/Applications and start the Directory Utility app. Unlock the little icon at the bottom left with your password to make changes (that lock icon only comes up when you click on Services or Search Policy).

    Select the Directory Editor and search for “ossec”.  You should find the three system users. Select them and remove them using the little minus icon at the bottom left.

    Removing files

    We’ll have to remove all files from /var/ossec and the configuration file from /etc/ossec-init.conf.

    Since OSSEC was likely installed from source, there are no handy graphic utilities to help us. Instead execute the following commands from the command line:

    sudo rm /var/ossec
    
    sudo rm /etc/ossec-init.conf

    Removing System Daemons

    While we find daemons in /etc/init.d on Linux distributions, they’re stored in .plist files in both /Library/LaunchAgents and /Library/LaunchDaemons. In the latter we find one like this:

    com.yourname.yourserver.ossec-control.plist

    The exact name will depend on your user name and machine name. Remove this file, then restart your system.

    Further Reading





     
  • Jay Versluis 9:28 am on May 6, 2018 Permalink | Reply
    Tags: , GitHub   

    Categories: How To, Screencast ( 87 )   

    How to embed images in GitHub Readme Files 

    In this screencast I’ll show you how to add images to your GitHub Readme files. You can use the Markdown or HTML syntax for this, I’ll show you both versions. Make sure to upload images to your own repository and provide the relative path to them.

    Here’s the syntax:

    In Markdown

    In Markdown syntax, use the following example to embed an image:

    ![](path/to/image.png)

    In HTML

    GitHub also supported the HTML syntax, which uses the standard IMG tag. Pasting HTML code in a website is always a little tricky, but let me try:

    Should you have spaces in your file names, you can replace them with %20, just like in standard HTML (like “file%20name”).

    Now go and make those Readme.md files look handsome!





     
  • Jay Versluis 1:51 pm on January 29, 2018 Permalink | Reply  
    Categories: How To, Screencast ( 87 ), WordPress ( 145 )   

    How to fix the “Occasional White Screen of Death” Error in WordPress 

    In this video I’ll show you how to fix an odd phenomenon I’d like to call “The Occasional White Screen of Death”. Here’s what happened: (More …)





     
  • Jay Versluis 6:10 pm on April 30, 2017 Permalink | Reply  
    Categories: How To, Mac OS X ( 36 )   

    How to mount and unmount drives in macOS and OS X from the command line 

    Unmounting external drives on a Mac is usually done quick and simple by either dragging drive icon to the trash, or by using the eject symbol in a Finder window. Mounting usually happens automatically when a new drive is inserted into a USB port or SD card slot.

    However, there is a way to do this via the command line, of which I am a big fan. Fire up a Terminal session and see how to do it.

    Listing available drives

    To see what’s currently attached to your Mac, let’s use the diskutil command, followed by the word list. You’ll see output like this:

    diskutil list
    
    /dev/disk0 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *512.1 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh SSD           511.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    
    /dev/disk1 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk1
       1:                        EFI EFI                     209.7 MB   disk1s1
       2:                  Apple_HFS Mac HDD 1TB             999.9 GB   disk1s2
    
    /dev/disk2 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *1.0 TB     disk2
       1:                  Apple_HFS VM Drive 
    

    Attached drives are listed with their physical locations on the left (i.e. /dev/disk0, /dev/disk1, etc), as well as with their respective partitions if available on the right (like disk0s1, disk1s2, etc). Make a mental note of the latter: you’ll see that we have a physical disk (like disk0), on which several partitions may have been created. It is those partitions we’ll mount and unmount, NOT the physical drive.

    Unmounting an attached hard drive

    On my system I have two internal hard disks (disk0 and disk1), and one external USB drive (disk2). Let’s unmount that USB drive now:

    diskutil unmount /dev/disk2s1
    
    Volume VM Drive on disk2s1 unmounted
    

    Note how we use the unmount command. We need to specify the location of the partition with its full path (i.e. /dev/disk2s1).

    Mounting an attached hard drive

    To mount the drive again, without having to take it out and plugging it in again, I can issue this command:

    diskutil mount /dev/disk2s1
    
    Volume VM Drive on /dev/disk2s1 mounted
    




     
    • Barry 1:01 pm on December 5, 2017 Permalink | Reply

      Hi, Jay! How can I execute unmount script when I close the lid (sleep) of my mac and execute mount script when I open the lid (wakeup)?

      • Jay Versluis 11:42 am on January 20, 2018 Permalink | Reply

        Hi Barry – oh, that’s a good question. I wish I knew, it would be a very useful option indeed. Sadly I don’t know the answer, but let’s keep our eyes and ears open. If I find a way to do it, I’ll let you know. If you find a solution, please share it here.

        All the best,

        JAY

  • Jay Versluis 5:44 pm on October 4, 2015 Permalink | Reply
    Tags: , htaccess   

    Categories: How To   

    Apache: How to block all other IPs except for your own 

    Sometimes I have to work on WordPress sites that are too busy to display the admin interface. This can happen if there’s more traffic than the server can cope with. In such cases, we may need to tell every visitor to come back later while we carry out some maintenance.

    But how? Thanks to an Apache command to block all IP addresses, except for our own. We can even display a “maintenance” page while we’re hard at work behind the scenes.

    Let’s see how. Add the following to your .htaccess file in the web root directory, replacing 12.34.56.78 with your own IP address:

    ErrorDocument 403 /maintenance.html
    Order Allow,Deny
    Allow from 12.34.56.78
    

    Save the file on the server and see the site speed up as of by magic. No more requests but your own shall be processed henceforth.

    Thanks to MickeyRush and b101101011011011 for this solution on Stack Overflow:

    How do I find my own IP?

    There are several services that will display the IP you’re currently connecting from. Head over to http://whatsmyip.org, or type “my ip” into Google.

    Does this work with NGINX too

    I’m sure the principle does, but I know very little about NGINX configuration. The above directive is for Apache only. If you know how this works in NGINX, please leave a comment below.





     
  • Jay Versluis 12:06 pm on December 30, 2014 Permalink | Reply
    Tags: Stack Overflow   

    Categories: How To   

    How to find your starred questions (favourites) in Stack Overflow 

    Stack-Favourites

    You can mark questions in the Stack Exchange network simply by clicking the little star icon. A yellow star means you’ve marked it as a favourite, a grey one means you haven’t. It’s a convenient bookmarking system.

    But where can you see a list of what you’ve starred? It’s not exactly obvious, so let me show you how to access your favourited questions and up voted answers. I’m using Stack Overflow as an example, but the principle is the same on all Stack Exchange sites.

    • head over to your Stack Overflow profile (click on your badge at the top)
    • find favorites at the bottom
    • now select added to see your starred/favourited questions
    • or select votes to see which answers you’ve up-voted

    Hope this helps!





     
  • Jay Versluis 7:09 pm on September 25, 2014 Permalink | Reply
    Tags:   

    Categories: How To   

    How to open up your Samsung NC10 

    Here’s a great video by Floppydonkey on how to open up your Samsung NC10 (and NC150). This comes in handy if you’d like to replace the hard disk.

    The tools we need are a small philips head screwdriver, a small flat screwdriver or spudger, and a tough finger nail.

    In a nutshell, and VERY CAREFULLY:

    • turn your little buddy over onto a soft surface (lid closed, top down so that the back is facing you, headphone sockets face left)
    • take off the battery
    • loosen all screws, including those marked KEYBD (leave the ones for the memory flap)
    • where the battery once was, take the flat screwdriver and pop the two black plastic clips, just next to the two metal parts (inwards). Those are the two main clips that hold the tiny plastic body together.
    • take a tough fingernail and pop the back of the laptop where the battery sat (between those metal clips)
    • once done, lift the right side of the back first, leaving the headphone sockets
    • this is a bit fragile, but the whole back will lift off to the left
    • take out the cover from the headphone sockets
    • you’re done!

    The hard drive is held with one screw, simply take it out and slide the hard disk to the right, off the connector. It’s enclosed in a shelf of sorts, which is held onto the drive with two screws opposed the connector.

    Put everything back together in reverse order.

    Good luck!





     
  • Jay Versluis 10:18 am on September 18, 2014 Permalink | Reply
    Tags: ,   

    Categories: How To, Windows ( 22 )   

    What are the credentials to your AirPort Time Capsule 

    AIrPort Time Capsule

    There is something I keep forgetting time and time again: the credentials to my AirPort Time Capsule. It serves as my router, Time Machine Backup disk and even as shared storage for internal use, thanks to an attached USB drive.

    All our Macs connect to both drives automatically and without fail – but every once in a while we want to access something on the shared drive, either via Windows or another app like GoodReader. And every time I forget what those credentials are – particularly the user name.

    Because there just isn’t a dialogue to set it up.

    The password is fairly obvious because it’s something you’ve added when you set the device up. Chances are you can remember it. You can even reset it by pressing the reset button at the back of the device for one second – but not longer, or it’ll reset to factory settings). AirPort Utility will help guide you through this.

    But the user name? What is it? Something generic maybe? The name of the attached drive? Steve Job’s daughter?

    Turns out there isn’t one. Put anything you like. Seriously. I know it’s weird, and it’s just not how a computer brain works. The user name can’t just be arbitrary – but on Time Capsule it is. So use any user name you like.

    It doesn’t matter what as long as you put something into that field. Your uncle’s boyfriend’s pet name, or the day of the week. Anything. Just for heaven’s sake don’t leave it blank or the universe as we know it will seize to exist in a moment’s notice.

    But I guess nobody tells you this in the shiny brochure.

    And in case I forget how to connect those drives in Windows, here’s a quick reminder for completion:

     

    Connecting to the Time Capsule drives (Windows)

    Technically you can connect to the Time Capsule drives via two protocols: Samba and AFP. The latter however is only used on Apple computers. So with Windows and Linux, Samba it is.

    In Windows we can map a network drive by heading over to the

    • Windows Explorer
    • find My Computer (Windows 7)
    • or This PC (Windows 8.1)
    • select Map Network drive at the top of the window

    This will bring up a dialogue that shows a drive letter drop down and asks for a server path:

    Screen Shot 2014-09-16 at 20.27.51

    The browse option won’t find your Time Capsule – instead find the IP address on your network (usually it’s 10.0.1.1, but AirPort Utility will verify this for you in the “LAN IP” field). Add it into the path/folder field like this:

     

    \\10.0.1.1\drivename

     

    Two backslashes, followed by your IP address, followed by your drive name. If you don’t specify a drive name the operation will fail. If your drive name has spaces (like “Shared Data”) then just write them out – no need to escape them. CapItaLisAtiON is important here though.

    Hit finish and your drive should be accessible.

    To find your drive names, consult your friend the AirPort Utility. GoodReader on iOS will find those names automatically – but Windows does not.

    And that’s that: another puzzle solved. There is no user name when accessing a Time Capsule drive.





     
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