Spectacle CodeSlide: Present code with style

Present code with style using spectacle. Awesome way to present code, and putting the focus of the reader where it needs to be. It also lets you jump to specific lines even if they’ve already been displayed before (because code tends to jump). import React from 'react'; import { Spectacle, Deck } from 'spectacle'; import […]

Easily create new CLI aliases with `new-alias`

I love stuff like this: It’s a handy little alias to create aliases for commands you just ran … an β€œalias-generating alias”; my inner geek rejoices πŸ™‚ Here’s the code (add it to your .bash_profile): new-alias() { local last_command=$(echo `history |tail -n2 |head -n1` | sed ‘s/[0-9]* //’) echo alias $1=”‘””$last_command””‘” >> ~/.bash_profile . ~/.bash_profile […]

Batch install dependencies in all subfolder-organised projects

As a lecturer ICT I have to correct the work our students make. Therefor I collect all solutions and put them in a subfolder-organised structure on disk: per student I create a subfolder and put their solution into that folder(*). $ tree -L 1 . β”œβ”€β”€ student1 β”œβ”€β”€ student2 β”œβ”€β”€ … └── studentN As – […]

Bolts Framework: Tasks

[[object saveAsync:obj] continueWithBlock:^id(BFTask *task) { if (task.isCancelled) { // the save was cancelled. } else if (task.error) { // the save failed. } else { // the object was saved successfully. SaveResult *saveResult = task.result; } return nil; }]; Bolts is a collection of low-level libraries designed to make developing mobile apps easier. The first […]