Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
(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.
// Pure addToCart() returns a new cart | |
// It does not mutate the original. | |
const addToCart = (cart, item, quantity) => { | |
const newCart = lodash.cloneDeep(cart); | |
newCart.items.push({ | |
item, | |
quantity | |
}); | |
return newCart; |
"use strict" | |
var R = require("ramda"); | |
var Sequelize = require("sequelize"); | |
var Either = require("fantasy-eithers"); | |
var Left = Either.Left | |
var Right = Either.Right | |
var Observable = require("rx").Observable; | |
var rx = require("rx"); | |
var EitherHelpers = require("fantasy-contrib-either") |
by Bjørn Friese
Beautiful is better than ugly. Explicit is better than implicit.
I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.
With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.
This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async
+ await
.
#!/bin/sh | |
# Set the AWS environment variables for an AWS profile | |
# Useful for docker-machine | |
# | |
# Example: | |
# | |
# aws_env profile-for-testing | |
# | |
# Further information: | |
# See the AWS CLI `aws configure` |