To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
LiveView upload directly to AWS China S3
If you just want to copy-paste this it should "just work", but you'll need to get yarn
set up. Follow the instructions at https://yarnpkg.com/getting-started/install OR just run:
npm install -g yarn
yarn set version berry
yarn install
# this should make a .yarn/
, yarn.lock
, and .pnp.js
If you want to run these outside of the context of a running phoenix server, you can also run the mix tasks, mix assets.install
and mix assets.compile
. They are a copy paste of some the CLI bits but you could abstract them out to point to a config/cmds.exs
or something if you wanted.
defmodule Model do | |
schema "models" do | |
field :foo, :string | |
has_many :children, Model, foreign_key: :parent_id | |
belongs_to :parent, Model, foreign_key: :parent_id | |
end | |
@doc """ | |
Recursively loads parents into the given struct until it hits nil | |
""" |
10 umask 002 | |
set -g fish_user_paths "/home/linuxbrew/.linuxbrew/bin" $fish_user_paths | |
source ~/.asdf/asdf.fish | |
set -g pure_color_mute yellow | |
alias '_workspace'="cd /mnt/c/Users/marwen/PATH_TO/_Workspace/" |
Here's how to make jQuery DataTables work with npm and webpack. DT checks for AMD compatibility first | |
which breaks when you're using CommonJS with webpack. | |
Install DT core: npm install datatables.net | |
Install a DT style: npm install datatables.net-bs (bootstrap) | |
Install the imports-loader webpack plugin: https://github.com/webpack/imports-loader#disable-amd | |
Create a loader "exception" just for DT in webpack.config.js: | |
module: { | |
loaders: [ |
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'; |
country_codes = [ | |
%{ iso_3166_1: "AF", name: "Afghanistan" }, | |
%{ iso_3166_1: "AX", name: "Aland Islands" }, | |
%{ iso_3166_1: "AL", name: "Albania" }, | |
%{ iso_3166_1: "DZ", name: "Algeria" }, | |
%{ iso_3166_1: "AS", name: "American Samoa" }, | |
%{ iso_3166_1: "AD", name: "Andorra" }, | |
%{ iso_3166_1: "AO", name: "Angola" }, | |
%{ iso_3166_1: "AI", name: "Anguilla" }, | |
%{ iso_3166_1: "AQ", name: "Antarctica" }, |
Note: $
denotes the start of a command. Don't actually type this.
x86_65.sh
. If I had a 32-bit computer, I'd select the x86.sh
version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose Anaconda3-5.2.0-Linux-x86_64.sh
.wget https://repo.continuum.io/archive/[YOUR VERSION]
. Example: $ wget https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
$ bash Anaconda[YOUR VERSION].sh
($ bash Anaconda3-5.2.0-Linux-x86_64.sh
)diff --git a/assets/js/App.svelte b/assets/js/App.svelte | |
new file mode 100644 | |
index 0000000..221cde6 | |
--- /dev/null | |
+++ b/assets/js/App.svelte | |
@@ -0,0 +1,5 @@ | |
+<script> | |
+ export let name; | |
+</script> |