Quick ref for Netlify custom domains
Host: www, Value: you-netlify-site.netlify.com, TTL: 30 min
Host: @, Value: 198.61.251.14, TTL: 30min
| defmodule Turbolinks do | |
| @moduledoc """ | |
| in `web.ex` | |
| replace `use Phoenix.Controller` with `use Turbolinks` | |
| in `router.ex` add a the plug | |
| plug Turbolinks | |
| """ | |
| use Plug.Builder |
| #!/bin/bash | |
| # Totally c&p from various places all accross Internet | |
| # [JohnMosesman]: Even MORE c&p from http://codegists.com/snippet/shell/codeship-elixirsh_paulgoetze_shell & http://www.codegists.com/snippet/shell/elixirsh_lessless_shell | |
| # | |
| # Erlang | |
| ERLANG_VERSION=${ERLANG_VERSION:-19.0} | |
| ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz" | |
| ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"} | |
| # Elixir | |
| ELIXIR_VERSION=${ELIXIR_VERSION:-1.3.4} |
| upstream phoenix_server { | |
| server localhost:4001; | |
| } | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| server { |
Quick ref for Netlify custom domains
Host: www, Value: you-netlify-site.netlify.com, TTL: 30 min
Host: @, Value: 198.61.251.14, TTL: 30min
| Here's how to make jQuery DataTables work with npm and webpack. This is the simplest way I found to do it. | |
| See the previous revision of this gist for a way to do it with forcing AMD to be disabled if you need that. | |
| Install DT core: npm install datatables.net | |
| Install a DT style: npm install datatables.net-dt | |
| Then to initialize DT in your app, do this in your main entry point: | |
| // you can use import or require | |
| import dt from 'datatables.net'; |
| #!/bin/bash | |
| # Erlang | |
| ERLANG_VERSION=${ERLANG_VERSION:-19.0} | |
| ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz" | |
| ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"} | |
| # Elixir | |
| ELIXIR_VERSION=${ELIXIR_VERSION:-1.3.1} | |
| ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip" |
| #!/bin/bash | |
| files=$(git diff --cached --name-only | grep '\.jsx\?$') | |
| # Prevent ESLint help message if no files matched | |
| if [[ $files = "" ]] ; then | |
| exit 0 | |
| fi | |
| failed=0 | |
| for file in ${files}; do |
| #!/bin/bash | |
| # Erlang | |
| ERLANG_VERSION=${ERLANG_VERSION:-20.2} | |
| ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz" | |
| ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"} | |
| # Elixir | |
| ELIXIR_VERSION=${ELIXIR_VERSION:-1.6.3} | |
| ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip" |
| /***** Color Variables *****/ | |
| :root { | |
| /* Base Colors */ | |
| --colorGreen: #95d06d; | |
| --colorRed: #d06d6d; | |
| --colorBlue: #41c1c8; | |
| --colorBlueDark: #00587f; | |
| --colorOrange: #f7931d; | |
| --colorYellow: #d0ca6d; | |
| --colorGray: #979797; |