(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.
| container_commands: | |
| migrate_db: | |
| command: > | |
| docker run -e "DB_HOST=${DB_HOST}" -e "DB_PORT=${DB_PORT}" -e "DB_NAME=${DB_NAME}" -e "DB_USER=${DB_USER}" -e "DB_PASSWORD=${DB_PASSWORD}" aws_beanstalk/staging-app:latest npm run db:migration:run | |
| leader_only: true |
(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.
| Profunctor lenses | |
| ================= | |
| First, we enable the RankNTypes extension which gives us 'forall' and also import some modules: | |
| > {-# LANGUAGE RankNTypes #-} | |
| > module ProfunctorLenses where | |
| > import Data.Profunctor | |
| > import Data.Tagged | |
| > import Data.Bifunctor |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| <?php | |
| class PhotoApiTest extends TestCase { | |
| public function setUp() | |
| { | |
| parent::setUp(); | |
| Route::enableFilters(); |
| #!/usr/bin/env python | |
| # Script to clone all the github repos that a user is watching | |
| import requests | |
| import json | |
| import subprocess | |
| # Grab all the URLs of the watched repo | |
| user = 'jharjono' | |
| r = requests.get("http://github.com/api/v2/json/repos/watched/%s" % (user)) | |
| repos = json.loads(r.content) |