Add these functions to the bottom of mix.exs:
# Specifies which paths to compile per environment
defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
defp elixirc_paths(_), do: ["lib", "web"]| esphome: | |
| friendly_name: flexispot-e7q | |
| name: flexispot-e7q | |
| platformio_options: | |
| board_build.flash_mode: dio | |
| on_boot: | |
| - priority: -10 | |
| then: | |
| - button.press: button_m | |
| - priority: 600 |
| #!/bin/bash | |
| set -e | |
| droplet=netflix | |
| interface=Wi-Fi | |
| us_regions=( nyc1 nyc2 nyc3 ) | |
| random_region() { | |
| echo ${us_regions[RANDOM % ${#us_regions[@]}]} | |
| } |
| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |
Tested under webpack-dev-server 1.7.0.
npm installnpm start2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
| package main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| a1 := 0 | |
| a2 := 1 | |
| return func() int { |
(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.
| /*! | |
| * gulp | |
| * $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
| */ | |
| // Load plugins | |
| var gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| cssnano = require('gulp-cssnano'), |
| var uuids = angular.module('uuids', []); | |
| uuids.factory("rfc4122", function () { | |
| return { | |
| newuuid: function () { | |
| // http://www.ietf.org/rfc/rfc4122.txt | |
| var s = []; | |
| var hexDigits = "0123456789abcdef"; | |
| for (var i = 0; i < 36; i++) { | |
| s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); | |
| } |