Author Archives: Kirrus

php-fpm not starting pool

If for some reason adding a PHP-FPM pool doesn’t work, and you don’t know why, and you’ve spent 20 minutes bashing your head on it even though you’ve added the config file and everything.. make sure you’ve remembered to change the poolname at the top of the file from the [www] you copied from the www.conf file

I know most folk these days are using ansible and stuff to do this, but we add sites so rarely it’s just not worth setting up

Staying cool in a heatwave

I’ve been reading lots over the last little while, on how to stay cool in the current heatwave. This is all the recommendations I have. I’ll follow this up with explanations of each suggestion in another post later — writing this has taken a lot out of me! Links are for example, buy what’s available and fits your needs 🙂

The UK is not set up for heat waves of up to 40c, thousands of people will die, we may have power and water outages.

Things to do immediately

Things to do the day before the heatwave

  • Turn your fridge and freezer up — make them colder
  • Freeze bottles of water (Separately from the immediate water stock!). Old fizzy drink bottles are fine. Squeeze them a little before putting the lid on, to give the water space to expand into
    • For one of the bottles, fill it halfway up, and store in the freezer so you can get to it. When you want a cold drink, just fill it a bit, and shake. Instant cold water!
  • If you have south-facing windows, prepare to cover them. A sheet, tin foil, paper.
  • Prepare foods ready to eat cold. Tuna mayo, egg mayo for sandwiches, salads, cold meats, cook some beans ready. Consider cooking a pasta bake or similar and putting it entirely into the fridge
  • At night, open your windows:
    • If you have a multiple level house, open windows/doors on one side of your house on the bottom floor, and on the top open the windows on the other side — so air will flow in a diagonal
    • If you’re in a flat or bungalow, open the windows/doors on opposite side of the house
  • Try to stay at home, or indoors. If your office has air con, I’m jealous. Avoid heavy activity during the day
  • Cover any south facing window with tin foil / paper / baking paper / cardboard / sheets. Do this on the outside if at all possible. If you do it on the inside, you might overheat your windows, and break them. Expensive bills later!

During the heatwave

peeling warning sign

DO NOTs

Do not do any of these things. They will harm you!

  • Drink Alcohol
  • Drink too much coffee (A little to prevent withdrawal is a good idea, but give energy drinks a miss)
  • Use “Air Conditioners” that don’t have an extract hose, that you have to fill with water. They use up the indoor air ability to absorb water — and sweating is the main way you lose heat when it’s too hot, so they make you hotter and make fans work less effectively. It’s safe to use them with a window open
  • Use air conditioners with an extract hose out a window without sealing your window with these kits. Yes they’re ugly, but without them you’re literally pulling hot air in from outside!
  • Heavy exercise — including manual work — especially during the peak in the afternoon, 1200 – 2000 (12pm to 8pm)
  • Avoid cooking using the oven, or hobs whilst windows are closed. If you have to, use the microwave
  • Avoid travelling if possible. Trains will be very slow, aircon may fail. Roads may melt
Green node of traffic light

DOs

  • An hour after sunrise, or as close as possible, close your windows
    • During the heatwave, check the temperature sensor against the weather app, or your weather station. When the indoor temperature is close to the outdoor temperature, go outside a second to see if it feels cooler outside (in the shade!) than inside. If so, open the windows as recommended above — in a diagonal, or opposite side of your dwelling
  • Drink lots of water. One or two electrolyte drinks a day in the absolute peak temperature
  • If indoor temp is below outdoor temp, keep the windows closed. Make sure to open them when it’s warmer
  • Consider pointing a fan out the window once it’s time to open the windows. Use a tissue or light cloth to work out which way the natural wind is blowing air, and point the fan in the direction to work with the wind, not against it
  • Wear light, airy clothes. If you can, stick to 100% cotton, which will wick your sweat and help it evaporate, keeping you cooler
  • Wear a hat if you go outside, and remember your sunscreen — even if it’s cloudy
  • If you have cats, put out a few bowls of water, spread around the building for them to drink from
  • If you have plants, water them before the temperature peak
  • Shower with a lukewarm shower. You want the water just a little cool to the touch. Too cold, and you’ll confuse your body, too hot, and you’ll just make it worse
  • Freeze a hot water bottle. Wrap it in a towel to cool down
  • Wrap an ice pack in a towel, and hold it between your upper thighs. You have arteries there, so will cool your entire body rapidly
  • Damp a towel and put it around your neck
  • Put your feet in a bucket or large bowl of water
  • Don’t use your fans feature to have it change direction it blows air into — oscillation. You want to set up a breeze of air around your room, that’ll effectively multiply how much air is moving without needing too many fans
  • Put a bowl of ice in front of a fan
  • Damp a sheet, or wet duvet cover before sleeping
  • You can set up a fan to blow *into* a duvet cover, effectively inflating it with a constant supply of fresh air. You can use clothes pegs attach it to the fan’s grills

Comment your own tips below!

First Class Trouble: Crash and game logs

You can find Crash Logs from the game First Class Trouble here:
%LocalAppData%\FCT\Saved

You can get there quickly by opening a file browser (hit START + E at the same time), copy that line, and paste it into the address bar;

Crashes *should* pop up a window asking for permission to send to devs when the game crashes. If it doesn’t, you can always tweet them and see if they want the crash report 🙂

Recipes

In a fit of desperation, I tweeted asking for *simple*, *easy*, cheap recipes. This is what I got in return. I’m totally posting this so it’s really easy to print them.

And season to taste 😉 Salt & pepper of course, but you can add any herbs you like to it as well.
I must admit, I don’t know what Orzo is..
https://twitter.com/ConnallTheCoble/status/1149055579832410113
sunset photo, taken 20th april 2007 in Wales, UK.

Depression & Suicide

I wrote this as a response to an image post trying to guilt-trip people into not commiting suicide using friends and family, on reddit. The reddit OP removed his post due to criticism, so I’ve copied it here.

Here’s the thing most people don’t get about suicide.

Those who choose to kill themselves aren’t (normally) irrational. They’re making a considered option. They’re aware of the pain they’ll leave. They’re aware of the pain of the method.

Someone who chooses to commit suicide is exactly the same response as the person who chooses to jump to death from a burning building. It’s not that the suicide is a good option. It’s that staying is unbearable.

Severe depression, or severe recurrent depression the type I suffer from, is a cruel, evil disease. It eats at your joy of life, it eats at your ability to look after yourself, it eats at your ability to function day-to-day, even simple things like cooking a meal being more akin to climbing mount Everest in a wheelchair, blindfolded, with your hands tied behind your back, than anything else.

You want to help someone like me not decide in the darkest, most painful times not to die?

First, don’t try to guilt-trip them with friends and family. It won’t help, I already know all those things. I’ve already considered them. I’ve discounted them. Sometimes the suffering is just too great.

Second, be there. That friend who you’ve not heard from for a while? Phone. Suggest popping over for a cuppa tea. Suggest they come to you. Push a little. Text. Email. IM. Skype. Reach out.

Third, if you know someone is suffering, offer to listen, anytime, anywhere, anyhow, and mean it. Keep your phone on next to you, and pick it up at 3am if they call.

Forth, if someone is really bad, struggling day to day, offer real help. Not “I’m here for you” but “hey, I’m coming over Friday, we’ll watch a film and order pizza”. Or “Hey, I’m bringing over my pasta bake, and leaving it with you, I’ll pick up the dish tomorrow.”. “Hey, need any help with housework? I’m free Saturday to come help if you want?”

Finally, Accept that, even then, sometimes someone like me will be suffering too much, and it’s not about you. It’s not about your pain, that they were suffering too much, and decided enough was enough. They’re in less pain than they were before.

P.S. Vote. Vote for people who give a shit about mental health support (in the UK, NOT THE CONSERVATIVES FOR THE LOVE OF ALL THAT IS GOOD). Vote for those who care about basic medical support. Consider donating to research.

p.p.s edit; please don’t say anything along the lines of ‘why don’t you just decide to be happy?’. That doesn’t help.

But seriously, be there for your friends and family, especially if they’re being weirdly distant. You may just save a life.

Swappiness in linux

Shamelessly stolen from wikipedia because they’re thinking about removing this, as  “Wikipedia is not a howto”. *sigh*.

 

With kernel version 3.5 and over, as well as kernel version 2.6.32-303 and over, it is likely better to use 1 for cases where 0 used to be optimal.

To temporarily set the swappiness in Linux, write the desired value (e.g. 10) to /proc/sys/vm/swappiness using the following command, running as root user:

# Set the swappiness value as root
echo 10 > /proc/sys/vm/swappiness

# Alternatively, run this
sysctl -w vm.swappiness=10

# Verify the change
cat /proc/sys/vm/swappiness
10

# Alternatively, verify the change
sysctl vm.swappiness
vm.swappiness = 10

Permanent changes are made in /etc/sysctl.conf via the following configuration line (inserted, if not present):

vm.swappiness = 10

10 is generally good for ‘I don’t want swapping to happen except if you *really* need it.