(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| Array.prototype.splitAtEvery = (callback) -> | |
| sections = [] | |
| arrayClone = this.slice(0) | |
| $.each(arrayClone, (idx, item) => | |
| sectionsLength = 0 | |
| _.each(sections, (section) => | |
| sectionsLength += section.length; | |
| ) | |
| if callback(this, idx, item) == true | |
| sections.push(arrayClone.slice(0, idx+1-sectionsLength)) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import re | |
| from lxml import etree | |
| import StringIO | |
| import sys | |
| reload(sys) |
| /** | |
| * ArcUtils.java | |
| * | |
| * Copyright (c) 2014 BioWink GmbH. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)