(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.
| class MyController < ApplicationController | |
| def get_text | |
| data = "generated by rails controller" | |
| send_data(data, :filename => "rails_generated.txt", :type => "text/plain") | |
| #send_file 'evidence_tmp/tmp.zip', :type => "application/zip" # => when the file already exists. | |
| end | |
| end |
| #!/bin/sh | |
| daemon=beanstalkd | |
| executable=/usr/local/bin/$daemon | |
| port=11300 | |
| waldir=/usr/local/var/beanstalkd | |
| logfile=/usr/local/var/log/beanstalkd.log | |
| interface="127.0.0.1" | |
| params="-l $interface -p $port -b $waldir" |
| /** | |
| * Process an array of data synchronously. | |
| * | |
| * @param data An array of data. | |
| * @param processData A function that processes an item of data. | |
| * Signature: function(item, i, callback), where {@code item} is the i'th item, | |
| * {@code i} is the loop index value and {@code calback} is the | |
| * parameterless function to call on completion of processing an item. | |
| */ | |
| function doSynchronousLoop(data, processData, done) { |
(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.
| (function(root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['backbone.marionette', 'backbone.radio', 'underscore'], factory); | |
| } else if (typeof exports !== 'undefined') { | |
| module.exports = factory(require('backbone.marionette'), require('backbone.radio'), require('underscore')); | |
| } else { | |
| factory(root.Backbone.Marionette, root.Backbone.Radio, root._); | |
| } | |
| }(this, function(Marionette, Radio, _) { | |
| 'use strict'; |
| .text-xs-left { text-align: left; } | |
| .text-xs-right { text-align: right; } | |
| .text-xs-center { text-align: center; } | |
| .text-xs-justify { text-align: justify; } | |
| @media (min-width: @screen-sm-min) { | |
| .text-sm-left { text-align: left; } | |
| .text-sm-right { text-align: right; } | |
| .text-sm-center { text-align: center; } | |
| .text-sm-justify { text-align: justify; } |
| $('#calendar').fullCalendar({ | |
| viewRender: function(currentView){ | |
| var minDate = moment(), | |
| maxDate = moment().add(2,'weeks'); | |
| // Past | |
| if (minDate >= currentView.start && minDate <= currentView.end) { | |
| $(".fc-prev-button").prop('disabled', true); | |
| $(".fc-prev-button").addClass('fc-state-disabled'); | |
| } | |
| else { |
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "title": "JSON API Schema", | |
| "description": "This is a schema for responses in the JSON API format. For more, see http://jsonapi.org", | |
| "oneOf": [ | |
| { | |
| "$ref": "#/definitions/success" | |
| }, | |
| { | |
| "$ref": "#/definitions/failure" |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
First, run:
$ composer config --list --global //this will get the composer home path.
[home] /root/.composer //it's my composer home path.And then, edit the config.json in [home] directory, make it like this:
{
"config": {
"github-protocols": [