Time Flies

Lately there never seems to be enough hours in the day, it seem the busier I get the faster time seems to pass and the less it seems I get done overall.

It reminds me of my mum and other old folks telling me that time flies by, enjoy it while your young because it goes so quickly or various versions of the same tale.

A while ago I read an article on the perception of time speeding up as you get older. Science it seems says it true and there are a few fairly interesting theories as to why it happens, or at least we perceive it to have speeded up at least. Over the years Scientific American, The Daily Mail, The Independent, and many more have posted articles based on fairly solid research. There are 3 which I think are quite interesting and I can sort of see.

Out of Storage Space

This theory is that we have a certain amount of “storage memory”. While we are young we have apparent boundless space so we member everything and savour the details, the more we store. One suggestion were that as a child we pay more attention to the frivolous, meaning more detail is recorded so the slower it seems to pass. As the memory gets fuller (or we get more organised) we record less and less details, so time appears to pass faster.

This theory also explains what happens when the memory bank gets critically full, it randomly fills in gaps which much like a computer hard drives’ fragmentation causes our memory to slow down.  Eventually the brain is forced to ‘erase’ old and less useful memories, which can lead to corruptions in said memory with repeated erases, rewrites and extreme fragmentation.

Time Pressure

Time pressure is one we can all appreciate. Studies in Munich by Marc Wittman and Sandra Lehnhoff of Ludwig-Maximilian University (Munich) showed “time pressure” experienced by essentially working age people (20-59) which is the feeling we have too much to do and don’t have time to get it all done.

This is essentially simple over-estimation of out capabilities or under-estimation of time required which creates a time pressure or speeding of time.

Mundane Exclusions

This is one of my favourite theories. This theory says that when things are new or unusual we pay more attention thus slowing down time. As things get boring we stop paying attention and don’t create new memories, so we “jump” them. This creates the illusion that real time is speeding on by.

The older you get, the fewer things / experiences are new to you, the more things / experiences become mundane and the faster your accelerate through time.

Personally I can relate to all of them but I think its time pressure for me compounded by my memory getting fragmented.

Synology Root Access Denied or Wrong Password

I’m a huge fan of Synology NAS units, not so much of the camera licenses but thats a minor niggle and for another time. I recently found my root password appeared to have been change but I didn’t remember changing it. I rarely login to the root account so it could have been altered a while ago.

RED ALERT!

Synology Root Password Change

Synology Root Password Change

Instantly I assumed I had been compromised, so I logged in as Admin via SSH using PuTTy and changed the root password. Next logged in to DSM (The Synology OS) as Admin user, checked the firewall, and went to Auto Block finding a few IP addresses on the list, but the last one dated back months. Entirely possible it had been that long since I logged in last as root. I checked for other “users” and various other security checks and all seemed ok.

Once the Red Alert has subsided and back to Amber Alert I started to look around on the net and found many comments to the effect “my root password has changed” and “my root account is blocked” and with some further digging found references to the last major DSM Update which were DSM 6.0.

DSM 6.0 Root Password Change

It seems something DSM 6.0 did, caused a reasonable amount of Synology owners root passwords to either change, become corrupt or expire. The solution were to simply change the root password to a new one or back to the old one (I would NEVER recommend the latter). I had inadvertently already done this with my first reaction, so had already fixed it on that particular server.

It dawned on that lots of users wouldn’t find this nugget of information or know how to do this since the reason you buy Synology is so you don’t have to get knee deep in linux but have all the power, so figured I’d blog it.

Exactly what you type into the prompt is in bold, and hit enter after each command.

  1. Using PuTTy enter your Servers IP (probably 192.168.0.2 or enter your servers hostname).
  2. Enter username as admin.
    (if you have changed your admin users name, change it here)
  3. Enter your admin password (same as used to access DSM).
  4. Enter the command sudo su.
    (this upgrades you to SuperUser)
  5. Enter admin password again when prompted.
  6. Enter the command synouser –setpw root ‘newpassword’.
    (use the single quotes around password)
  7. Enter exit, this returns you to normal user.
  8. Enter exit, this closes PuTTy.

You can now login as root user once again. I highly recommend using 2 different passwords for Admin and Root users.

Auto Block

Synology has a feature called “Auto Block” which automatically blocks IP addresses when they get the password wrong a number of times. You can find this under the Security Tab in the DSM. You may find your local network IP (192.168.0.*) or wherever you tried to access root from has been blocked, so its as well to check here and remove your IP remembering to save your changes.

Otherwise you find your connection by PuTTy being refused or randomly disconnected as happened on one of my units.

 

High Energy, High Protein, Body Transformation

There were an article in the American Journal of Clinical Nutrition earlier this year, about body composition. The team of scientists at McMaster University in Canada proved that a low calorie, high intensity weight training with added HIIT (High Intensity Interval Training) combined with high protein can cause dramatic and substantial changed in body composition in as little as 28 days.

Rough Shape

Taking 40 men in “rough shape”, hey there words not mine, cutting their usual calorie intake by 40% (this were calculated by body weight not the standard 2000/2500) and making them undertake intense exercise. I love this quote by Stuart Phillips who is the lead quack “It was a gruelling affair, These guys were in rough shape, but that was part of the plan. We wanted to see how quickly we could get them into shape: lose some fat, but still retain their muscle and improve their strength and fitness.”. Nowt like being told your rough as…

The Split

They split the guys into 2 groups, both groups were on the reduced calorie diet but the protein intakes were different as follows.

Group 1: High Protein, were taking 2.4 grams of protein per kilogram of body weight.
Group 2: Low Protein, were taking 1.2 grams of protein per kilogram of body weight.

Both groups were prescribed the same program of high intensity weight training AND interval training (cardio), 6 days per week, so quite intensive.

Group 1: High Protein lost 11 lbs of fat, gained 2.5 lbs lean muscle mass.
Group 2: Low Protein lost 8 lbs of fat, gained only 0.2 lbs (thats 3 oz) of lean muscle mass.

What’s interesting is that with such a huge deficit in calories none of the guys lost any muscle mass. I sort of expected them to lose more fat with the body struggling to maintain its muscle mass. Phillips went on to say “Exercise, Particular listing weights, provides a signal for muscle to be retained even when your in a big calorie deficit”. This kind of supports my view that you’d burn more fat to retain it.

The Twist

Again Phillips appears to have thought the same as I did that the higher protein group wouldn’t burn as much far, but in reality they lost 33% more fat. He said “(we) were a little surprised by the amount of additional fat loss in the higher protein consuming group.”.

There is an interesting caveat, Phillips says “We designed this program for overweight young men, although I’m sure it would work for young women too, to get fitter, stronger, and to lose weight fast. It’s a tough program and not something that’s sustainable or for those looking for quick and easy fix,”, he goes on to say “We controlled their diets, we supervised the exercise, and we really kept these guys under our ‘scientific’ thumb for the four weeks the participants were in the study.”.

The precise details of the diet, exercise and such aren’t released but the blueprint is there so should be reproducable to a good extent. There is a ray of hope, the same team hope to do a follow up study where its not so strict and potentially sustainable.

Myth Busters

This study maybe the tip of the iceberg which busts the myth that you can’t cut and bulk at the time time. It appears you can but its going to test your mettle, and push you to the edge.

 

WordPress Stuck in Maintenance Mode

Working on a new project recently with some custom plugins and the likes has caused a few shall we say glitches. A recent upgrade crashed half way through, well the database locked erroneously resulting in the website being stuck in “maintenance mode”.

DANGER, DANGER, RED ALERT!

Maintenance Mode

Maintenance Mode

Don’t panic, this is very very easy to solve…

A file called .maintenance (notice the . at the start) is created automatically by WordPress whenever you update WordPress, Themes or Plugins. This is created to effectively shut WordPress down so it can update cleanly. Once the update is completed successfully the .maintenance file is normally deleted.

There is a small obstacle, its IMPOSSIBLE to delete it via the wordpress admin (wp-admin) area of your website. You will need to access it via your web hosts file manager or via FTP.

HOW TO ACCESS THE FILE MANAGER

File Manager Options

File Manager Options

I use cPanel so the following steps will be done using that, and since its the most popular admin panel, the odds are high you’ll be using that too.

  1. Login to your host cPanel control panel.
  2. Scroll down the page to where it says File Manager and click it.
  3. When the Option Box (right) pops up, be sure select “Web Root” and next tick “Show Hidden Files (dotfiles)”.
  4. Scroll down to find the .maintenance file, it will usually be next to .htaccess, which is often the first file after the folders.
    *Be sure to note the .(DOT) before .maintenance.
  5. Select the file so its highlighted and hit Delete (Big red X).

How simple were that ?

 Alternative Methods via FTP

It can be done via FTP but that often needs a 3rd party application install, and configuring, using your web hosts control panel is something almost all website owners have access too.

Protein Snacks

Protein Snacks Screen Shot

Protein Snacks Screen Shot

A project I’ve been working on (not finished) which is related to one of my own personal ‘struggle’ and goals. The details aren’t that important but in short. A recent iDXA / DEXA Scan at Derbyshire University revealed I had exactly 86.419kg / 13st 6lbs of lean muscle mass (no bones/fat/etc included). This helped me set my macro-nutrition / diet quite accurately on my quest to get BEEEEEFCAAAKED. Again cut short this means scan means I’m aiming at 45g* protein per 6 hours so as to distribute my intake through the day. It’s hard work finding good sources, with the right nutritional balance (skewed to protein).
*These numbers are based on my own research, activity levels, body composition and conclusions, so do your own research for your numbers, maybe in a future post I’ll go deeper in to it.

Flexible Protein

This brings me neatly to the issue of finding flexible methods of getting the protein in without massively blowing the other macro’s. Overloading carbs is easy as ummm cake, overloading the fat is almost as easy. I buy biltong, jerky, protein bars, RTD shakes, protein gels and all sorts of good snacks when getting a balanced meal isn’t possible. Which with a busy lifestyle is quite common, you know the drill, your hungry, you buy a bag of crisp or chocolate bar or something else, this site is about NOT going that way.

Just for an example…

Lion Bar 43g has 205kcal, 9g fat, 29g carbs, 2g protein, 80mg of sodium.
DynaBar 43g has 180kcal, 6.9g fat, 17g carbs, 14g protein, 50mg sodium.

The Protein Dynamix DynaBar has 1/3 less fat, sugar and sodium, 7 times more protein, this isn’t the best macro split, but given the very close taste, the Dyna is 100% a better option.

So there we have it, how my new project can and will help myself and others in the same boat.

 

Querying The Dac with PHP

I see the same thing over and over, and some people imply or suggest its easy or incredibly hard to connect and query/poll the Nominet DAC (Domain Availability Checker) to get basic data about a domain.

There are a few reasons you would want to do this, the main ones are to build a drop list database or build a drop catching script, but both are built on the same foundations.

Before you can use this, you need to be a Nominet Member, and have a DAC Subscription, but you can access the DAC Testbed for Free without Membership or Subscription.

I’m going to use a high level language for this example, which in this case is PHP, but Perl is faster, and a low level compiled language like C would be way way quicker, but PHP is more than adequate for database building and non-prime drop catching.

Basic Connect to and Poll the Dac

The above code will result in the following output, it really is as simple a half a dozen lines of code,.

You can now act upon the returned $resp variable, explode it into manageable chunks like…

This will return an array of 6 blocks numbered 0-5, which will be…

From here you can put it into a database…

Query a List of Names

Its most likely you would want to add some sort of loop to load a list of names…

Thats the basics covered where most people seem to strugle, its really endless where you can take a script.

I may revisit this code in future and expand on it, but for now, lets see what you do with it.