How to change your User Name in WordPress
This week has seen a rather large scale attack of a bot network that specifically targets the “admin” user in WordPress installations. This means that if your site as a user called “admin” then your site is under threat of being a potential target. No matter if you’re using “admin” as an active user or not: if it exists, your site is at risk. Period. In this podcast I’ll show you how to change your user name. Sadly this isn’t as easy as just amending “admin” to something else;...
read moreHow to add a User Account on CentOS
On both CentOS and Red Hat Linux systems you can easily create new user accounts with their own home directories. Here’s how you do this from the command line. I’m assuming you’re logged in as root, and the new user we’d like to create is called “testuser”: useradd testuser Let’s give our testuser a password so s/he can login to the system via SSH: passwd testuser This will prompt for a new password (twice), followed by the message that “all authentication tokens have been updated”. Which...
read moreHow to parse a JSON URL in iOS and Cocoa
Both Cocoa and iOS have built-in methods to parse (and generate) JSON data using NSJSONSerialization. Most commonly you’ll want to call a URL with parameters which will return some data. You take this output and tell Objective-C that it’s JSON, then typecast the return to an array or a dictionary which in turn lets you access the data. It’s genius! Here’s an example: // create the URL we'd like to query NSURL *myURL = [[NSURL alloc]initWithString:@"http://domain.com/jsonquery"; // we'll receive raw...
read moreHow to use a Selector
Just a quick reminder before I forget (again) how selectors are called: Some of Apple’s pre-written methods use whats known as a Selector. Here’s an example method that uses a selector: // create a bar button item UIBarButtonItem *linkButton = [[UIBarButtonItem alloc]initWithTitle:@"My Title" style:UIBarButtonItemStyleBordered target:self action:@selector(myMethod)]; Notice how the selector is created on the second line. All it wants to know here is the method name really. Imagine you had a method called myMethod in the...
read moreHow to remove the first n characters from an NSString
There’s a convenient method for that by the name of substringFromIndex. This example removes the first character: NSString *complete = @"12345"; NSString *cutOff = [complete substringFromIndex:1]; NSLog(@"%@", cutOff); // cutOff is now 2345 substringFromString takes only one parameter which specifies where to start the new string. The first character is 0 based, like in arrays. The parameter can’t be longer than the original string’s length for obvious...
read moreHow to create a Fetch Request in the Xcode Model Editor
You can create Fetch Requests in the Xcode model editor, including a Predicate. These are somewhat easier to setup. To create one, select your .xcdatamodeld file, then head over to Editor – Add Fetch Request. Give it a catchy name and a filter property, and much of the above code becomes obsolete. Here’s how you can retrieve one of those in code: // create a fetch request from template NSFetchRequest *fetchRequest = [self.managedObjectModel fetchRequestTemplateForName:@"MyFetch"]; NSArray *fetchedObjects =...
read moreIn the Pipeline at WP Hosting
New year, new company – and behind the scenes we’re busier than ever. It doesn’t show on the front page yet though, so we thought it’s a good idea to keep you guys in the loop of what we’re up to. We’re talking [unordered_list style=”tick”] New Support Forum Video Podcasts Ready Made Websites Affiliate Scheme and our Grand US Tour with WordCamp and Parallels Summit [/unordered_list] New Forum First of all, and just to reiterate this, my WP Guru site is still up and running and will remain as it...
read moreHow does email work – in simple words
We all use email every day, but most of us take it for granted without knowing how it actually works. There’s some pretty strange terminology around this subject – let me explain it to you in simple words. Your Local Email Client First let’s talk about the email client. That’s the programme you use to check your emails. Outlook is an email client, so is Thunderbird, Mail on Mac, Outlook Express, and even the app you use on your smart phone which you can read and send emails with. Many email services also provide access...
read moreA New Beginning
Testing testing… this thing on? Hello world, WP Hosting has launched! After too much time thinking about it we finally have a presentable working website up and running. Welcome everybody! In a nutshell: we sell the finest WordPress hosting here – check out what we’ve got on offer for you today. We want to make it fun and easy for our customers to have a website. Headaches and hassle is best left to us, while you focus on your content. The Launch of WP Hosting Launching a new project is tough – it certainly is for me....
read moreWorkshop: How to Upgrade WordPress
In this screencast I’ll show you how easy it is to upgrade the WordPress Core, Themes and several Plugins at once. Note that this may not work on some hosts. If you’re hosting with me you have nothing to fear of course 😉 Check out my other workshops in this series...
read more