// Richard Hart / Hates_

Hackintosh phantom wake from sleep

computing, mac

For some reason since updating Mountain Lion on my hackintosh my computer would mysteriously wake up in the middle of the night. As sleeping and waking had never been 100% I figured that it was just down to a quirk of having a hackintosh. But I did some digging and after some searching and log investigation I found the following entries:


[~]$ syslog | grep -i "Wake"
May 19 00:55:57 <Notice>: Next maintenance wake [Backup Interval]: <date: 0x7fe4899038b0> Sun May 19 01:38:25 2013 BST (approx)
May 19 00:55:57 <Notice>: Requesting maintenance wake [Backup Interval]: <date: 0x7fe4899038b0> Sun May 19 01:38:25 2013 BST (approx)
May 19 00:56:03 <Debug>: Wake reason: ?
May 19 00:56:03 <Debug>: The USB device 4-Port USB 3.0 Hub (Port 3 of Hub at 0x14800000) may have caused a wake by issuing a remote wakeup (3)

Which lead me to believe it was a config issue, and a quick look through the preferences un-earthed the following:

Energy Preferences

Disabling “Wake for ethernet internet access” has solved my problems and there haven’t been any phantom wake from sleeps since.

Read More

It’s never as bad as it seems

life

Nothing is ever as bad as it seems. There are only a handful of situations which are truly terrible. While I sit here and dred not making a shit tonne of money, there are people who have to worry about how they are going to shelter and feed their family, there are people facing certain death for their beliefs and views, there are people with absolutely nothing, with no hope and no prospect of ever changing that.

We should be eternally grateful for the things that we do have, because there is always someone else worse off. So when times seem hard and the road ahead difficult, remember those people worse off than us and let it spur us on to do the best that we can given the opportunities laid before us.

Read More

Going through the motions

life

Going through the motions is easy. It’s easy to go to the gym and move about a bit. It’s easy to turn up for work and put in the minimum neccessary. It’s easy to be busy and not really achieve anything. Day in, day out we go through the motions of life, blinded by the illusion of progress. But just because the wheels are turning it doesn’t mean we’re actually going anywhere. To get big and strong in the gym takes serious dedication constant pushing ourselves to the limit. To be successful at work takes going above and beyond what’s expected of us and delivering excellent work. Progress is the key. Are you better than you were yesterday? Yes? Good. No? Try harder tomorrow. Be aware of your current state and actions and be sure they are moving you forward.

Read More

It’s my data

computing, spree

Recently I’ve been working on migrating an existing e-commerce site from InstanteStore to Spree and have been having a nightmare of a time trying to get the client’s data out so that I can start the job of importing it all. The trouble is a lot of the information is not exportable, and whatever data is available is only half of what you would expect. It’s starting to make me angry because as far as I’m concerned that data belongs to my client, and to add insult to injury, to get access to certain parts of the data they want to charge extra money to “build an interface” to it.

I can understand on free to use sites like Facebook/Instagram/Tumblr/Whatever-Startup that the price of usage might be my data and that I might not be able to take it and go elsewhere with it, but when you’re paying for a service I expect to have full ownership and access to my information.

Read More

Adding a custom Spree payment Gateway outside a Rails Engine

computing, programming, rails, spree

Adding a new Payment Gateway to Spree through a Rails Engine is pretty straight forward as you can hook in your new gateway after the initial payment gateway array has been created. This is how the spree_gateway gem does it:


initializer "spree.gateway.payment_methods", :after => "spree.register.payment_methods" do |app|
    app.config.spree.payment_methods << Spree::Gateway::AnotherGateway
end

If you want to do the same thing for your own project contained gateway it’s a little different. If you try to just directly edit the payment_methods array in an initializer it will get wiped out when the Spree core engine sets the initial bogus and simple methods. I got around the problem by hooking my gateway in using the after_initialize method. Here I’m hooking in after SpreeGateway:


SpreeGateway::Engine.config.after_initialize do
  Your::Application.config.spree.payment_methods << Spree::Gateway::YourGateway
end
Read More