Today I learned about the fnmatch function in PHP. It supports wildcard matching. Handy!
Found this article which said:
Open about:config and disable browser.urlbar.trimURLs. Easy peasy!
I just spent a few days trying to get over 500,000 points in The Lost Viking game in StarCraft 2 so that I could earn the Gold Level achievement and round out my profile as 100% complete. I’m pathological. It’s a curse. I played and played and played. For days! (It actually took me a few years to get around to it. For a long time I had decided that for me it was too hard. I couldn’t even get Bronze Level. But when I was sitting on 99% completion I simply had to find a way…)
Eventually I took stock of the situation and realised that the reason I was having so much trouble getting the high score was that my strategy was flawed. The major problem I was having was that I was using the Plasma Canon x2 rather than the Side Missiles x2.
Without thinking very hard about it I just decided that it would be better as a general rule to use the more powerful weapon, the Plasma Canon. But it’s not. It’s considerably more efficient to use the Side Missiles than the Plasma Canon. It wasn’t until I switched strategies that I could finally get the high score. Please consider the following explanation:
With each weapon type there are 2 levels. Let’s use some rough numbers that approximate the weapon capabilities: let’s say that Plasma Canon Level 1 delivers 5 units of damage to 1 target per unit time, Plasma Canon Level 2 delivers 10 units of damage to 1 target per unit time, Side Missiles Level 1 delivers 1 unit damage to 4 targets per unit time, and Side Missiles Level 2 delivers 1 unit damage to 6 targets per unit time (sort of, approximately).
The amount of damage that you need to inflict on a (non-Boss) target varies from say 1 unit to 50 units depending on the unit type. The most common unit types only require 1 or 2 units of damage to kill, but there are some stronger units. Let’s say we’re dealing with a median case of 1 unit damage to kill and we fire either Level 2 of the Plasma Canon or Side Missiles:
With the Plasma Canon x2 if we fire 3 shots, assuming we are accurate, we can deliver 30 units of damage to 3 targets. With the Side Missiles x2 if we fire 3 shots, also assuming we are accurate, we can deliver 18 units of damage to 9 targets. With the Plasma Canon we get 3 kills and “waste” 27 units of damage, with the Side Missiles we get 9 kills and waste 9 units of damage (assuming it’s actually possible to hit 3 units per shot the way you target your 3 shots, more on this later). So Side Missiles are *vastly* superior to the Plasma Canon when it comes to efficiency. On the numbers above approximately 3 times more efficient. So, always get Side Missiles!
If you compare your strategies you will see the effects of the increased efficiency of the Side Missiles over the Plasma Canon in your scores for each level. When I was using the Plasma Canon x2 I was getting about 65% to 75% kills per level, but when I switched to Side Missiles x2 I was getting over 90% kills per level. More kills per level is more points per level, and more points per level means you can reach Gold Level sooner. The greater efficiency of Side Missiles is pretty much a mathematical certainty.
Drones are pretty handy too, so always try to get at least x1 Drones. If you decide you’d like to run with only x1 Drone and try to collect more bombs then that’s a respectable choice. Personally I try to run with x2 Drones because I get the extra 1/2 point damage per unit time and have a higher chance of having my life saved by it. But, up to you. I guess if you wanted to ignore Drones altogether in order to get more Bombs that could also be a valid approach… but I like x2 Drones.
So since the goal is to max out Drones and Side Missiles as soon as possible, what should you get first? On this decision I decide to take whatever I can get sooner. I just take whatever is available as soon as I can. Sometimes it’s easier to get max Side Missiles before Drones, and vice versa. I don’t think it’s too important. It’s hard to make a quantitative judgement. With regard to damage per unit time you are probably better off getting your Side Missiles first, so you can deliver more damage sooner. But, how do you weigh the possibility that a Drone might save your life? If you have a Drone it might turn out that it sacrifices itself to save your life, in which case having it would probably have been better than delivering more damage. Also the Drone seeker missiles can help clear out your bottom corners before enemies that arrive there can fire at you, and that’s worth something. So my rule of thumb is just to take whatever Drones or Side Missiles I can get as they become available. If I can’t get one thing easily I will wait until it turns to something else that I can get easily, and if the power-up is about to cease changing and become something I don’t want then I might use a Bomb to clear a path to it before that happens (more on this point below).
As a general rule I try to max out my Side Missiles and Drones before collecting Bombs. That’s because I pretty much always have a few Bombs up my sleeve so it’s better to get the other upgrades working for me and delivering more damage per unit time on the screen sooner and thus for longer. So the goal is definitely to collect as many Bombs as you can, but try to max out your Side Missiles and Drones first. Also, having Drones first is pretty handy if it turns out it saves your life when you stuff up your navigation! Bombs are similarly life-saving: never be afraid to drop a Bomb if you’re cornered, that’s what they’re for! Bombs are pretty much as good as an extra life if you just recognise your imminent danger and press that Ctrl key in time. Always prefer to “waste” a Bomb than risking a Life, Bombs are much easier to come by! (That said, always try to save a few Bombs (say 3) for taking on the Terra-Tron at the end of every 3 levels.)
If there is a power-up on the screen but it’s hard to get to it in time because there are too many enemies or enemy missiles in the way, then drop a Bomb and go straight for it to make sure you get it in time. It’s always better to drop a Bomb to get a power-up that you would otherwise miss, even if that extra power-up is another Bomb! If you lose 1 Bomb and gain 1 Bomb you lost no Bombs and get the points for the power-up that you would have missed if you hadn’t used your power-up. If the other power-up isn’t a Bomb (i.e. it’s a Side Missile or Drone) then it’s good to have it (and the points you get for it) rather than missing it because you wanted to save a Bomb. So spend Bombs to get power-ups if necessary (i.e. if you can’t get it without clearing the way with a Bomb, obviously if you don’t need to clear a path to a power-up with a Bomb then that’s better.)
You can maximise the efficiency of your Side Missiles by trying to stay approximately in the centre of the screen both horizontally and vertically. It’s tempting to keep navigation simple by playing in “one dimension” from the bottom of the screen and only moving left or right. But with Side Missiles it’s better to move in two dimensions and spend as much time as you can in the vertical centre by moving up and down. This is especially true when there are powerful units (like Science Vessels or Swarm Hosts or Battle Cruisers) that arrive in twos, one on each side. If you stick in the middle horizontally and vertically when fighting these guys then you will be delivering maximum damage because you will be hitting each of them at the same time (and your front guns will be clearing out whatever arrives in the top-middle of your screen too.)
With Side Missiles it takes about 3 to 4 times as long to kill a boss as it does when you have the Plasma Canon. Back on our rough numbers: the Plasma Canon x2 can deliver 10 units damage per unit time, but to a single target the Side Missiles can only deliver 2 units damage per unit time. On those (imaginary) numbers you can kill a Boss 5x faster with Plasma Canon x2. The reason it doesn’t quite take 5x as long is that with the Side Missiles you can deliver continual damage from the side of a Boss even when you can’t get under it horizontally, which isn’t possible with the Plasma Canon.
My exception to the Side Missiles x2 rule is if you are fighting a Boss. But don’t try to run with Side Missiles x2 and then try to switch them out for Plasma Canon x2 before confronting the Boss, that’s way too hard to get the timing right and it essentially wastes 2 Bombs that you could otherwise have had. So always arrive at a Boss with your Side Missiles, but if the Boss kills you while you are fighting it and your weapons drop then wait for them to become Plasma Canons before picking them up again. The weapons always cycle through in the following order: Side Missiles, Drone, Plasma Canon, Bomb. So if you drop your Side Missiles because you died you will need to wait for them to cycle through Drone to Plasma Canon before picking them up again. If you respawn on top of your weapons and accidentally pick up one of your old Side Missiles then pick up the other Side Missile too, it’s better to have x2 weapons in case you die again and then you can try for Plasma Canon x2 again. If you finish fighting a Boss with a Plasma Canon then when the next level starts switch back to Side Missiles again as soon as you can.
So, here are the rules I follow in summary:
- Always try to have x2 Side Missiles
- Always try to have at least x1, or even better x2, Drones
- Take weapon upgrades as they are available as soon as you can, don’t worry too much about getting Side Missiles first or Drones first
- Try to max out your Side Missiles and Drones before collecting Bombs, but aim to collect as many Bombs as you can
- If you can’t make it to an upgrade in time because there are too many enemies or enemy missiles in your way use a bomb and get that powerup!
- If you’re cornered drop a Bomb rather than losing a life
- Try to stay in the middle of the screen both horizontally and vertically to maximise total effective damage per unit time
- If you get killed fighting a Boss wait until your weapons change to Plasma Canons before picking them up again then kill the Boss faster with your increased fire-power
- If you’re fighting a Boss and get killed and then accidentally pick up a Side Missile because you respawned on top of it, then pick up the other Side Missile too, don’t wait for it to become a Plasma Canon
- Be careful! Try not to take risks. If you find yourself in hot-water: drop a Bomb, that’s what they’re for!
Today I ran into this error:
jj5@mercy:~/public-git$ git push origin master error: gnutls_handshake() failed: A TLS warning alert has been received. while accessing https://firstname.lastname@example.org/public/git/info/refs
The solution, of all things, was to add a ServerName spec into my Apache configuration file /etc/apache2/sites-enabled/default-ssl.conf, e.g.:
I got an error in KDE on Debian complaining about DPMSControl something or other.
I found this conversation and learned:
xset dpms 0 0 0 xset s off