Xcode 8 Long Compile Time

Posted on Posted in Examples, IOS, Programming

Xcode 8 has some interesting quirks when compiling. I hypothesize that it is part of the type interpolation system. Takes the following code, for example: var description: String { get { let desc = String(“\(summary ?? “”)\n \(narrative ?? “”)\n Start: \(start?.dateString ?? “”) End:  \(end?.dateString ?? “”)\n \(location ?? “”) \n \(htmlLink ?? “”)”) […]

Custom Functions in Flask-SQLAlchemy with PostgreSQL

Posted on Posted in Articles

I have a Flask-SQLAlchemy model backed by a PostgreSQL database that looks like this: class Thing(db.Model) title = db.Column(db.Text(), nullable=False) narrative = db.Column(db.Text(), nullable=False) tags = db.Column(ARRAY(db.Text()), index=True) My customer wants to have a full text search over all three fields simultaneously, but wants the results ordered by where the hits are. They should be ordered […]

Hiding the status bar for UIImagePickerController

Posted on Posted in IOS

The stock UIImagePickerController’s editing controls are under the status bar and therefore somewhat useless. Use the following category to hide the status bar: #import “UIImagePickerController+RemoveStatusBar.h” @implementation UIImagePickerController (RemoveStatusBar) – (void)viewDidLoad { [super viewDidLoad]; if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1)   // iOS7+ only { self.edgesForExtendedLayout = UIRectEdgeNone; [self prefersStatusBarHidden]; [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; } } – (BOOL)prefersStatusBarHidden { return […]

Removing Nefarious Obfuscated php

Posted on Posted in Reminders to Self

This is mostly a reminder to myself: There exists mechanisms for nefarious folks to inject obfuscated scripts into wordpress pages. If this happens: Search for injected scripts: grep -lR “eval(base64_decode” * (Look for the obfuscated code) These script often don’t put new lines in the corrupted page so you’ll often have to be a bit […]

Blogs – what’s different…

Posted on Posted in The Internet

I attended the ‘This Is Not Art’ festival last weekend. Great vibe, lots of cool stuff and a host of talks on interesting things. However – it was also a bit frustrating as almost all the talks that I attended missed the central point of their respective argument. For example, the blog. I heard that […]

Massive Outage

Posted on Posted in ICT Management

An anatomy: We had a simultaneous UPS failure at 2:33PM on the 22nd (which I am going to call H hour). This caused the ERP production cluster and storage to go down hard. Cause of the UPS outage is at the moment unknown. They seem to have been out for a little under a second. […]

The trouble with tenure

Posted on Posted in ICT Management

I am blessed in my team in that we have some folks with a lot of tenure. We have several people that have been working in this department for more than 15 years – much of that in one role. And as we’re still working with an ancient legacy system, it makes for fantastic systems […]

On Risk

Posted on Posted in TDDM

Risk is such a ubiquitous word in IT. It sits along side such words as mitigate and workflow. Process and change management. It is one of those concepts that has become so meaningless and hackneyed to be a positive detriment to quality.. What we don’t talk about is fear and courage. We all know it […]