Writing Browserify modules for your Angular app

Following up on my previous Let’s Build an angular app with Browserify post I got a few questions on how to create modules for your app. Let me show you. -- If you haven’t already, make sure you’ve read the walkthrough on how to set up the environment to work with Browserify and Gulp, so you can follow along. Basically, what you do when you require() a module, is looking for what the script you require exposes to the outside world through module.

Recording a website with PhantomJS and FFMpeg

When I realised you could easily generate screenshots from a site with PhantomJS I just needed to know if I could take it one step further, and record a video. The goal What I wanted was to record 10 seconds of video from a random website and output it as a .mp4. For this short demo I decided we should go with one of the fun examples on Pixi.JS as they’re interesting to capture.

Let's build: An AngularJS app with Browserify and Gulp

Today I want to show a generic workflow and setup I have used a lot lately when working on building apps with Angular. It uses Gulp as a CI system and Browserify to minimize code clutter and maximize awesomeness. So let’s jump in. Update 21 october 2014 - Frickle As with most things, boilerplates evolve. I decided to expand the boilerplate we’re building below with a backend for the API side, as well as cleaning up some things based on new findings and updated modules.

How to use environment variables in your Angular application

If you develop a website that uses multiple environments such as development, staging and production you probably have a configuration file of sorts to handle things like database settings, mail server credentials, and so on for your backend system. But how do you handle such variables in the front-end? Specifically, in an AngularJS App? For instance, you might have a seperate API you’re talking to for your content, which has a different location locally, than on your production server.

Blogging with CabinJS and Grunt

I just want to mention CabinJS. It took me all of 10 minutes to set it up, and another 10 to get the automatic deployment to Github Pages working. The other 4 hours this sunday I spent on layouting, designing and tweaking the blog you’re reading now. And that’s pretty sweet. There’s quite a few static site generators on the market today, of which Jekyll probably is the most famous, but CabinJS elevates a minimalistic setup combined with Grunt tasks to a new level of awesomeness.

HTTPIe, a command line HTTP client

Stumbled upon HTTPie, a command line HTTP client. It’s pretty awesome. Basically it’s Curl on steroids, as it has an easy interface and syntax highlighted output. Here’s an example of a simple GET request to the Bacon Ipsum JSON service: Of course you can do actual useful stuff as well, such as POST-ing, Authentication, Cookies, Custom Headers, etc. As the repo says, the main features are: Expressive and intuitive syntax Formatted and colorized terminal output Built-in JSON support Forms and file uploads HTTPS, proxies, and authentication Arbitrary request data Custom headers Persistent sessions Wget-like downloads Python 2.

A more colourful cat in your shell

I just wanted to quickly share a shell alias I have been using lately to get some more color in the terminal when you cat a file. Below is a screenshot of what an average terminal looks like when you just use $ cat somefile.js Sure, it does the job, and you probably are ok with it looking dull as hell. But what if you could make it look like this:

Customize the terminal

I love the terminal. Besides the fact it makes you look awesome while using it, it can also do about a gazillion different things. Most of them useful. One thing is for sure, while developing webapps I have it running all the time and spend a lot of time running commands and monitoring output. So why not make it look as pretty as it is awesome? In this short walkthrough I’ll explain how to customize the terminal to make it look like mine, but make sure you fiddle with the settings so it works best for you.

Getting used to Vim

So there we go. Writing this post in vim. Macvim to be exact. Trying not to touch the arrow keys, not use the h-j-k-l too extensively either, work with A and I a lot, and generally trying not to cock things up too much by hitting the wrong commands. So why do I willingly put myself through the torture of using the monster that is Vim? Well, just like a lot of developers out there, I’ve had a long time desire to be able to use Vim properly.

Updated the PHPUnit CakePHP installer

Just a quick note, the CakePHP PHPUnit installer has been updated to use version 3.7.8. Go grab it here if you are no fan of PEAR and want a self contained PHPUnit testing system. Works on Mac OSX, Linux and Windows.