Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
# remove any bad refs | |
git remote prune origin | |
# pipe into bash and auto-delete any branches that have been merged into master! | |
git log master --pretty=format:'%d' | grep '^ (origin' | tr -d ' ()' | sed 's/origin\//git push origin :/' |
sysctl -w fs.file-max=12000500 | |
sysctl -w fs.nr_open=20000500 | |
ulimit -n 4000000 | |
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000' | |
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384' | |
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384' | |
sysctl -w net.core.rmem_max=16384 | |
sysctl -w net.core.wmem_max=16384 | |
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb |
mix phx.new app_name | |
cd app_name | |
cd assets | |
npm install tailwindcss @tailwindcss/ui postcss-import postcss-loader --save-dev | |
npx tailwindcss init | |
npx tailwind init tailwindcss-full.js --full | |
# Change the app dir to your app dir! |
function isPlainObject(o) { | |
return o && toString.call(o) === '[object Object]' && 'isPrototypeOf' in o; | |
} | |
function isArray(o) { | |
return toString.call(o) == '[object Array]'; | |
} | |
function objectToString(val) { | |
var INDENT = ' '; |
#!/bin/bash | |
# This script can be used in "run & hope" mode or you can use it as a recipe to | |
# do things manually - you probably want the latter if you really care about | |
# the data in your databases. | |
# Happy hacking | |
# /Eoin/ | |
# Tell bash to stop if something goes wrong | |
set -e |
guard 'shell', :elixirc_bin => "/usr/local/elixirc" do | |
watch(/(.+\.ex$)/) { |m| `elixirc #{m[0]}` } | |
end | |
guard 'shell', :elixir_bin => "/usr/local/elixir" do | |
watch(/(.+\.exs$)/) { |m| `elixir #{m[0]}` } | |
end |
# config/initializers/delayed_job_mongoid.rb | |
module Delayed | |
module Backend | |
module ActiveRecord | |
class Job < ::ActiveRecord::Base | |
def self.before_fork | |
::ActiveRecord::Base.clear_all_connections! | |
::Mongoid.master.connection.close | |
end |
(defun tester (&rest cl-keys) | |
(cl--parsing-keywords ((:function nil) (:match nil)) nil | |
(if (and buffer-file-name (string-match cl-match buffer-file-name)) | |
(setq tester--test-run-function cl-function) | |
(setq tester--test-run-function nil)))) | |
(defun tester--store-setup () | |
(setq tester--last-test-file buffer-file-name) | |
(setq tester--last-test-function tester--test-run-function)) |
If you're still on 0.4.x, follow [this 0.4x to 0.5.0 upgrade guide] (http://learnelixir.com/blog/2014/10/29/migrating-applications-from-phoenix-0-dot-4-1-to-phoenix-0-dot-5-0/), then head back over here.
Phoenix 0.6.0
brings some nice enhancements and a few backwards incompatible changes. The following steps should get your 0.5.x
apps up and running on the latest and greatest.
The Router no longer defines the default :browser
and :api
pipelines for you, but they remain the idiomatic defaults. You can copy the standard pipelines into your router: