Swift syntax cheatsheet
2015, February 24

If you are currently learning how to build iOS and Mac apps with the Swift language, you may be interested in a syntax cheatsheet I made as a collection of Xcode playgrounds.

I will continue to add new playgrounds in the coming days in order to demonstrate some Swift techniques.

Get it on Github

All you have to do to get the playgrounds is to clone the Git repository on Github at github.com/nicoschuele/swift-cheatsheet. Open a terminal and simply copy this line:

    git clone https://github.com/nicoschuele/swift-cheatsheet

Add your own tricks

If you want to add your own tips and tricks, just create a new playground, add it to your local repository and submit a pull request on Github.

back to top | share this on Twitter:

My Sweet Setup: Part II - Sublime Text 3
2014, December 21

In the past, I wrote about the hardware part of my sweet setup. Now, let's have a look at the software. For Part II, I want to tell you about my main tool: the text editor I use for more or less everything, from jotting down plain text notes to writing code. I use Sublime Text 3, on Mac, Linux and Windows with several add-ons.


Over the past years, I used loads of different text editors: TextMate, Notepad++, Chocolat, TextWrangler, Sublime Text 2, Atom,... . Each have their strengths and weaknesses and I kinda like all of them. My requirements for an editor are:

  • project navigation on the left
  • easily remap or add new key bindings
  • syntax highlighting and support for custom themes
  • simple git integration
  • basic autocomplete feature
  • support for Ruby, HTML, CSS, SCSS, ERB, JavaScript, CoffeeScript, SQL, Markdown

According to these requirements, I find that Sublime Text 3 is the perfect match for me.

Getting add-ons

The easiest way to enhance a default installation of Sublime Text is to add the Package Control addon. Check out how to install it here: https://sublime.wbond.net/installation.

The theme

My Sublime Text 3 UI is a mix between the Predawn theme and the RailsCasts color scheme. It looks like this:


The add-ons

  • Better Coffeescript: to highlight SCSS code properly
  • Bracket Highlighter: highlights matching brackets (or do ... end keywords)
  • Emmet: improves HTML and CSS workflow. Watch the video on its homepage. It is my absolute favorite add-on. Such a productivity boost
  • Git and GitGutter: for integration with Git (although ST3 can't compete with the Git integration available in TextMate 2 or Atom)
  • SublimeERB: let's you bind one keypress to add ERB tags such as <%= %> and places your cursor between the tags
  • SideBarEnhancements: adds an enhanced menu to the side bar
  • SublimeCodeIntel: basic autocomplete feature for the supported languages (Ruby as well are Rails are included)
  • ColorPicker: adds a color picker to Sublime Text. Very useful when working on CSS stuff

Do you use other add-ons that you deem essential? Let me know or tweet!

back to top | share this on Twitter:

New site: made with RailsBricks in 30 minutes
2014, November 5

I usually rebuild my personal site from scratch each January. This year, I'm a bit early as I wanted to build something really quickly with RailsBricks 3, my open-source Rails app creator that I released last week. This is also to give you an idea of how fast you can build something using RailsBricks. Let's see what the site does.


It's a standard personal site/blog like you find a lot on the web. It has:

  • a front page
  • a blog
  • a contact form
  • a search form
  • a twitter feed
  • a custom responsive UI based on Bootstrap 3
  • a subscription form to my newsletter
  • Google Analytics
  • an admin zone where I can write new posts using the Markdown syntax
  • the code is safely stored in a Git repository at Bitbucket

It runs on Heroku with a PostgreSQL database, using the Unicorn web server.

This is how the articles editing section looks like in the admin zone:


So, how long did it take to make this website? Let's have some numbers...

Made quickly

I started from scratch, just an empty directory and timed myself for each section. Here's the breakdown:

  • Generating the base app with RailsBricks (rbricks -n): 1 minute
  • Ruby coding (some changes in the default controllers, mostly): 13 minutes
  • HTML/CSS coding (changed colors, added few CSS rules like the small tutorial tag): 16 minutes
  • Publishing on Heroku (set the env variables, the domain name, ...): 2 mins

That's right, the whole thing was made in 32 minutes! That's less than a lunch break at work. Of course, to these numbers, you can add non coding tasks such as planning or checking the spelling. But yes, the technical part took 32 minutes and I am not a fast nor a good coder.

Your turn, now

If you want to try to do the same, have a look at the RailsBricks intro video and then, build something!

Your feedback is welcome: contact me or send me a tweet.

back to top | share this on Twitter: