Newcircuit 1c8db4401779333389b774086d6390f160bbb49078a0eda577b43dcf5018a77f

Ashley Whetter's Blog

[programming, linux] ++ [stuff]

Social inside twitter icon ee809e0d7c5b2294b7d548e7223909c678d76c5484045ae68ecb7c559cd7fade Social inside google icon dbbc88b746b52525f1e1bd5e2bf44152b2713fb976f7e68b903c2d13e9fbd160 Octocat 1fcbe3003defcb5ee415b3a7aa989bbc724ccf3c446436e848c27437901c6ca2 Social inside rss icon ff8ccbbb13f265afbe3cadba03c838cdbcad75b6f223a7937eab3ee35afc933d Social inside linkedin icon 5f3acefcb096b75afe32a0e0b3d90d1f2c1b374049eb8c1996203225e1ae34ba

Fixing "Unable to parse YAML file" Unity Error

Recently I came across the following error when working on a group Unity3D project:

Unable to parse YAML file: [could not find expected ':'] at line 2

We had no yaml files (that we knew of) and Unity could still build and run the project so this error seemed a bit odd.

It turns out that the error was caused by git adding text to highlight a conflict in some of Unity's .meta files. So fixing the error was just a case of finding the meta files and resolving the conflicts.

I used this ruby script to find the files that needed to be fixed. Just place the script in the root of the Unity project and run it. It'll print the locations of the broken files.

Categories: None

Getting Started with IRC

What is IRC?

IRC is basically a network of chat rooms. The chat rooms are called channels, and each channel talks about different things. There are channels for anything you could want to talk about!

Channels are hosted by networks. Usually a network will let you start any channel you like.

Getting a client (XChat)

Firstly you'll need to download and install an IRC client. In this example we'll use XChat. It hasn't been updated for a few years but it's still widely used.

Starting XChat

Picking names

When you start XChat you'll be presented with the following window.

"Nick name" is the name you want people to see you as when you join a channel. In the example above I used 'NotAshley'. "Second choice "and "Third choice" are the names other people will see if the other name is already taken. "Username" generally isn't seen by other people. "Real name" is obviously your real name, although you don't have to use your real name if you don't want to.

Adding networks and channels

When you join a channel you are usually given a network to connect to and a channel to join. In this example we'll use the network 'synirc', and the channel '#spam'.

Add the synirc network by clicking 'Add'. A textbox will show. This is for the name of the network. Type 'synIRC' and press Enter.

Next click 'Edit', and the following window will appear.

Click 'Edit' on this new window. We now need to type the server details. We'll connect to synirc here, but you can use whatever server details you've been given instead. For synirc the server details are ''. 7001 is the SSL port for synirc so we need to tick the 'Use SSL for all the servers on this network' and 'Accept invalid SSL certificate' tick boxes. Tick the 'Auto connect to this network at startup' tick box to automagically connect to this network when XChat starts.

XChat can automatically join channels as well. Click the '...' button next to the 'Favourite channels' text box. The following window will appear.

Click 'Add', then type the name of the channel you want to join and press Enter. In this example we'll connect to '#spam' but you can use whatever channel name you've been given instead. Click 'OK' and you'll return to the previous window.

Leave the other boxes blank for now, but we'll cover the 'NickServ password' box later. Press 'Close', then 'Connect'.

Congratulations! You're in IRC! Just type to start talking. Everyone who is in the channel is listed on the right hand side.

(Optional) Registering your nick

If you don't want anyone to steal your name you can register it if it's not already taken. On the left hand side of the XChat window, click the name of the network that you want to register your name on. For example 'synIRC'. Then type the following command: '/msg NickServ REGISTER <password> <email>', where <password> is a password of your choice, and <email> is the email address that you want your confirmation email sent to.

The '/msg' part is an IRC command. In this case it's sending a private message to someone. NickServ is the person we are sending the message to (but NickServ is actually a bot). You can also use '/query <recipient>' to start a private conversation with someone.

NickServ will now send you an email confirming your nick and password. Once you've followed the instructions in this email go back to XChat. Click 'File' 'Network List'. This will bring up a window you've seen before. Select the name of the network that you are registering you nick to (for example 'synIRC') and click 'Edit'. In the 'NickServ password' box enter the password you used to register. Press 'Close' and 'Close' again. XChat will now tell NickServ that you own your nick for you every time you connect to that IRC network.

You can also tell NickServ who you are yourself with the command
'/msg NickServ IDENTIFY <password>'.

Additional Comments

Here are some extra tips for getting used to IRC:
  1. Firstly a word of caution. Don't assume a public channel is private. Anyone could be logging the channel.
  2. Only use commands in the network window (by clicking on the network name on the left hand side). If you type the command wrong you don't want everyone in the channel to know your password (or how bad at typing you are ;) )
  3. Use the '/away <Message>' command to tell people you are away. Then do '/away' to come back.
  4. If you start to type a person's nick, press tab to have XChat complete it for you.

Further Reading

IRC bouncers are a great way of making IRC more useful. They keep you logged in so anyone can message you while you are away, and you can pick up the message when you log back in.

Categories: None

Fixing the Sonar database after a failed upgrade

When upgrading Sonar from a version below 2.13, it will update the current Sonar database to the new format. If something goes wrong whilst Sonar is upgrading, Sonar won't clean up for you and you'll have to either restore a backup or cleanup yourself before upgrading again.

To cleanup manually, run the following commands on the database:

DROP TABLE reviews, review_comments, active_rule_changes, active_rule_param_changes, manual_measures, notifications, duplications_index;
DROP TABLE loaded_templates, resource_index, action_plans, action_plans_reviews, active_rule_notes, rule_notes;

Sonar might not have created all the tables if it didn't get far enough, but the commands should still execute as far as possible.

Categories: None