Access the MongoDB instance on your MUP (Meteor UP) deployment using a GUI explorer
There comes a time when you need to access the MongoDB database associated with your remote MUP (Meteor Up) deployment. According to their docs the only way you can do this is to SSH in and access it from there. That's fine (and technically accurate) except that leaves you only with a console interface via
meteor mongo which isn't . . .
Easier way to remember what each vim command does.
A pneumonic device helps us remember something seemingly abstract by giving it a familiar context. For instance in order to remember the planets in order from closest to furthest from the sun you could use the handy "My Very Educated Mother Just Served Us Nectarines".
When I first learned Vim I just . . .
Posted in: vim
Client side generation of PDF using jsPDF, HTML, DataURIs, and Cordova on iOS8+ and Android in MeteorJS
We want to be able to generate an PDF document from HTML without needing direct processing by the server such that it is presented to the client in the Cordova app with a done button. This allows the user to generate a pdf, view it, and then close it and return to the app. I'll take a MeteorJS specific approach but it's very . . .
Quick examples of using bluebird with mongoose in node. I just want to show you a couple common use cases to help you recognize how to use promises.
We are going to take common Mongoose use cases for finding and creating documents and going to use Bluebird (or more generally, any promise library that follows Promises/A+) to migrate from the typical callback method to promises.
There are many sites that show you simple examples of promises but sometimes you just:
- . . .
When your @IBDesignable is either too complex or requires data not available when previewing in the interface builder, here is how you deal with those errors.
In situation where our @IBDesignable is too complex to complete in under 200ms we need a way to still get it's benefits without the complex errors that it throws. You may argue that "well my code still builds just fine". Sure, but now you have a bunch of errors and when you actually get one, you may have trouble debugging. Here . . .
The ios-charts framework says to use the "android" documentation. However it turns out that there is enough difference in the properties each framework uses that it can be frustrating to learn how to use the ios-charts library. Here is a quick reference.
Android: Simple Formatter
// usage on axis, could also use on data object or dataset yAxis.setValueFormatter(new MyValueFormatter());
iOS: Simple Formatter
var myValueFormatter = NSNumberFormatter() // normal value formatter configuration myValueFormatter.numberStyle = . . . .
How to create and class a 100% customized NSNumberFormatter in Swift. Useful when frameworks (*cough* 'ios-charts') require a NSNumberFormatter for value formatting.
When using an API/Framework you may need to provide a NSNumberFormatter.
iosChart.valueFormatter = MyCustomNSNumberFormatter
But what happens if one of the options NSNumberFormatter has doesn't have the options you want and you need something highly customized. And when I say custom, I don't mean deciding if you need a . . .