Forward Thinkinghttps://blog.petermolgaard.com
[ˈfɔːwədˌθɪŋkɪŋ]Mon, 03 Jul 2017 03:59:35 +0000enhourly1http://wordpress.com/https://s2.wp.com/i/buttonw-com.pngForward Thinkinghttps://blog.petermolgaard.com
Keyboard Shortcut for Inserting Comment in Word for Machttps://blog.petermolgaard.com/2015/10/29/keyboard-shortcut-for-inserting-comment-in-word-for-mac/
https://blog.petermolgaard.com/2015/10/29/keyboard-shortcut-for-inserting-comment-in-word-for-mac/#commentsThu, 29 Oct 2015 04:21:19 +0000http://blog.petermolgaard.com/?p=3007]]>If you have come to this post, chances are you like me found yourself tired of adding comments by using the mouse and was surprised that the “Insert Comment” didn’t feature a keyboard shortcut… but dispair not, the solution is here…

Very intuitively (not really), the keyboard shortcut to insert comment is

Command + Alt + A

If you want to see for yourself or set it to something else, you can find the setting here:

Tools > Customize Keyboard > Insert > InsertAnnotation

Now, you can enjoy the thrill of being able to review documents galore without having to let your fingers leave your keyboard… what a production boost, eh !?

This is still very very early stuff, I just wanted to share it quickly to inspire other people just starting out with Fuse to tinker themselves and share their own cool stuff…

Anyways, enough talking, let’s get to it…

My first task was to use the fetch operation which is the recommended way to make network requests via HTTP, it’s a first-class citizen in Fuse which resembles the same status it will take the browser in the future…
You can read more about the proposed standard for the Fetch API here:https://developer.mozilla.org/en/docs/Web/API/Fetch_API

It illustrates how it’s relatively easy to implement a 3rd party reusable library and how it can be imported into your Fuse project.

The standard used is CommonJS, and contrary to what FuseTools document themselves, I found during my experiment that its possible to both use the advised syntax of module.exports, but also the less convoluted syntax of exports.[memberName], which is the default for e.g. the TypeScript compiler.

I have included a link to an archive at the end of the post which contains all the files required for the experiment, please feel free to play around with it.

Until an official TypeScript definition is released for Fuse, I’m maintaining my own definition which allows me to compile against the global members of Fuse…https://github.com/pmoelgaard/fuse

Now, this is very early stuff, so please understand that it’s very rough around the edges and covered in wet paint, and that I’m only sharing it because I’m very excited of where Fuse is taking the next generation of cross-platform development for both mobile, but also desktop, which is one of the really cool features of Fuse…

]]>https://blog.petermolgaard.com/2015/10/16/fuse-singapore-user-group/feed/0pmoelgaard12108964_10204542482514304_6104581158965946665_nRecommended contents of .gitignore for Fuse Projectshttps://blog.petermolgaard.com/2015/10/12/recommended-contents-of-gitignore-for-fuse-projects/
https://blog.petermolgaard.com/2015/10/12/recommended-contents-of-gitignore-for-fuse-projects/#respondMon, 12 Oct 2015 10:36:17 +0000http://blog.petermolgaard.com/?p=2991]]>It’s always a good discussion what to include in a Git repository and hence what to include in a projects .gitignore file…

Here is what we are using at the time of writing…

.build/*
.cache/*

]]>https://blog.petermolgaard.com/2015/10/12/recommended-contents-of-gitignore-for-fuse-projects/feed/0pmoelgaardHacks to get Loopback App’s running on Herokuhttps://blog.petermolgaard.com/2015/03/27/hacks-to-get-loopback-apps-running-on-heroku/
https://blog.petermolgaard.com/2015/03/27/hacks-to-get-loopback-apps-running-on-heroku/#commentsFri, 27 Mar 2015 10:52:28 +0000http://blog.petermolgaard.com/?p=2987]]>To get Loopback App’s running on Heroku, a couple of hacks are required due to the way Loopback manages it’s configurations.

The first issue to solve is to get Loopback to take the port number from the environment since Heroku uses arbitrary port numbers to target different applications.

There is probably a more elegant way, however I first wanted to stay out of node_modules files, so I opted to just focus on modifying server.js.

It’s actually very easy, since loopback internally supports passing arguments to the listen function all the way out from the server.js file.
It does this by switching between automatic configuration and explicit configuration from the arguments passed to the listen function.

So, basically it’s just amending the “start” function to fetch the port number from the environment and pass it as argument to the listen function.

]]>https://blog.petermolgaard.com/2015/03/27/hacks-to-get-loopback-apps-running-on-heroku/feed/2pmoelgaardUsing node-sass with latest version of io.jshttps://blog.petermolgaard.com/2015/03/27/using-node-sass-with-latest-version-of-io-js/
https://blog.petermolgaard.com/2015/03/27/using-node-sass-with-latest-version-of-io-js/#commentsFri, 27 Mar 2015 04:38:50 +0000http://blog.petermolgaard.com/?p=2982]]>When using node-sass together with io.js, one of the problems is that it’s not updated to work with the latest version of io.js (at the time of writing, v.1.6.2).
Currently node-sass only supports io.js until v.1.2.

This causes the installation of node-sass and any libraries that depends on node-sass to fail to fetch all resources during installation, which eventually causes processes that tries to use the node-sass library to fail.

The error message during installation is (in my case, using io.js 1.6 on a MBP) the following:

The failing part is when the node-sass library tries to fetch binding files which are necessary to connect to some of it’s libraries, the solution is therefore to either change the code where it fails (easy, but messy, not my recommendation) or simply download the binding files and manually add it to node-sass (easy, and also a bit messy, but at least we don’t change the code, so a bit easier to manage).

and save it to the following location:
node-sass/vendor/darwin-x64-iojs-1.6/binding.node

Now, when you execute a process that uses node-sass, it will find the file, and even you are not running io.js 1.2, the binding still works (only tried with io.js 1.6).

It’s by no means a perfect solution, but it solves the problem immediately and it’s something easily automated since it only involves downloading and copying some files, not changing some code…

]]>https://blog.petermolgaard.com/2015/03/27/using-node-sass-with-latest-version-of-io-js/feed/1pmoelgaardSimple WhoAmI for Loopbackhttps://blog.petermolgaard.com/2015/03/01/simple-whoami-for-loopback/
https://blog.petermolgaard.com/2015/03/01/simple-whoami-for-loopback/#respondSun, 01 Mar 2015 16:09:07 +0000http://blog.petermolgaard.com/?p=2969]]>Retrieving the currently authenticated user in a Loopback Application can be done in many ways, and one of them is the one I want to share in this post.

I wanted to be able to utilise the Angular SDK as well as the Explorer, so adding a routing manually in a boot script was not really an option, however simple that might be, so I decided to opt for implementing it as a custom Model.

The first thing to do is to create a whoami.json and whoami.js file in the commons directory.

While getting one’s hands dirty with Sequelize, it can be useful to have access to the documentation, so even it’s relatively simple I decided to wrap the documentation for Sequelize in a docSet for Dash…

]]>https://blog.petermolgaard.com/2014/04/07/angularjs-nvd3-directives-for-dash/feed/0pmoelgaardangularjs-nvd3-directivesBookshelf for Dashhttps://blog.petermolgaard.com/2014/04/07/bookshelf-for-dash/
https://blog.petermolgaard.com/2014/04/07/bookshelf-for-dash/#commentsMon, 07 Apr 2014 14:12:13 +0000http://blog.petermolgaard.com/?p=2948]]>In addition to the recent Moment and Async docSet for Dash, I have created a third docSet distribution, this time for the cool library Bookshelf which is pretty cool Node.js ORM for PostgreSQL, MySQL and SQLite3 in the style of Backbone.js.

Created by Tim Griesser, its just one project in the line of many which is solving every day issues with elegance and efficiency… Currently its the same approach as with Moment and Async, where its merely an embedded version of the online documentation…