Phoenix 1.5 requires Elixir >= 1.7. Be sure your existing version is up to date by running elixir -v
on the command line.
$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.5.0
# Playlist | |
# playlist id: PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR | |
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' -o '~/Downloads/%(playlist_index)s-%(title)s.%(ext)s' -i PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR | |
# or | |
youtube-dl -f mp4 -o '~/Downloads/%(playlist_index)s-%(title)s.%(ext)s' -i PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR | |
# or | |
# 135 = 480p mp4, 140 = m4a | |
youtube-dl -f '135+140/mp4' -o '~/Downloads/%(playlist_index)s-%(title)s.%(ext)s' -i PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR |
Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.
This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.
The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.
To grab the new archive, simply run:
#!/usr/bin/env elixir | |
ecto_import = "import Ecto.Query, only: [from: 2]" | |
mixexs = | |
Path.join(["mix.exs"]) | |
|> File.read! | |
namespace = | |
Regex.run(~r{defmodule\s+(\w+)\.}, mixexs) |
#!upstart | |
#Elixir app is deployed using capistrano v3 | |
#Swap app_name for your application name | |
description "Service Up - app_name" | |
author "Colin Densem <hello@summit360.co.uk>" | |
start on filesystem |
class ApiLogger < Grape::Middleware::Base | |
def before | |
Rails.logger.info "[api] Requested: #{request_log_data.to_json}\n" + | |
"[api] #{response_log_data[:description]} #{response_log_data[:source_file]}:#{response_log_data[:source_line]}" | |
end | |
private | |
def request_log_data |
# /etc/rabbitmq/rabbitmq.config | |
# | |
# Follow the instructions on RabbitMQ website to create certificate authority and certificates - | |
# | |
# http://www.rabbitmq.com/ssl.html | |
# | |
[ | |
{rabbit, [ | |
{tcp_listeners,[{"127.0.0.1",5672}]}, |
# Change the path to match the path to your machine. | |
$mrb_path = File.expand_path("~/src/mruby") | |
$mrbc = File.join($mrb_path,"/bin/mrbc") | |
task :default do | |
# dumps the Ruby file to disk | |
File.open("mandelbrot.rb", "w"){|f| f << mandelbrot_ruby_code } | |
# creates the .c file containing mandelbrot char array for the bytecode | |
`#{$mrbc} -Bmandelbrot_bytecode ./mandelbrot.rb` | |
example_file = wrapper_code(File.read("./mandelbrot.c")) |
#!/bin/sh | |
USERNAME=shostakovich | |
mkdir ~/tmp | |
cd ~/tmp | |
# Install GCC + Git | |
curl https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg > GCC-10.7-v2.pkg | |
sudo installer -pkg GCC-10.7-v2.pkg -target / |
@mixin animation ( | |
$name: false, | |
$duration: false, | |
$timing_function: false, | |
$delay: false, | |
$iteration_count: false, | |
$direction: false | |
) { | |
@if $name { -webkit-animation-name: $name; -moz-animation-name: $name; -ms-animation-name: $name; } | |
@if $duration { -webkit-animation-duration: $duration; -moz-animation-duration: $duration; -ms-animation-duration: $duration; } |