This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Reporter do | |
def progress(last_data, file_name, {size_type, chunk_size}) do | |
IO.inspect({last_data[:downloaded], "#{last_data[:rate]} MB/s", file_name, size_type, chunk_size}) | |
new_timestamp = :os.system_time(:milli_seconds) | |
timestamp_diff = new_timestamp - last_data[:last_timestamp] | |
case chunk_size do | |
:unknown -> | |
downloaded = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ZoqueteWeb.SocketSerializer.V2 do | |
@moduledoc false | |
@behaviour Phoenix.Transports.Serializer | |
alias Phoenix.Socket.{Reply, Message, Broadcast} | |
@doc """ | |
Translates a `Phoenix.Socket.Broadcast` into a `Phoenix.Socket.Message`. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Zoquete.Mixfile do | |
use Mix.Project | |
... | |
defp deps do | |
[ | |
{:phoenix, "~> 1.3.2"}, | |
{:phoenix_pubsub, "~> 1.0"}, | |
{:phoenix_html, "~> 2.10"}, |