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
eval $(cat "$(pwd)/docker/env/envfile.env" | grep -v "#" | awk -F= {'print "export "$1"=\""$2"\""'}) |
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
function new_phoenix(){ | |
mix archive.install --force https://github.com/phoenixframework/archives/raw/master/phx_new.ez | |
mix phx.new $1 --no-brunch --no-ecto --no-html --binary-id | |
} | |
new_phoenix foobar |
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
array = [ 1, 2, 3, 4, 5 ] | |
defmodule Functional do | |
def functional([]), do: [] | |
def functional([head |tail]), do: [ 0 = rem(head, 2) head + 1 | functional(tail)] | |
def functional([head |tail]), do: [head * 2 | functional(tail)] | |
def functional(_), do: [] | |
end | |
IO.puts Functional.functional(array) |
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
def non_functional | |
array = [0, 1, 2, 3, 4, 5, 6] | |
output = [] | |
array.each do |a| | |
if a % 2 == 0 | |
output.push(a + 1) | |
else | |
output.push(a * 2) | |
end |
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
{ | |
"title": "Terminal等でESCあるいはctrl-gあるいはctrl-sで日本語入力を英数に", | |
"rules": [ | |
{ | |
"description": "TerminalまたはMacVimでESCあるいはctrl-gあるいはctrl-sを押したときに日本語入力を英数に切り替える。", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "escape", |
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
# docker for macを入れる | |
$ brew install docker-machine-driver-xhyve --without-docker-machine | |
$ sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve | |
$ sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve | |
$ rm -rf /usr/local/bin/VBox* /usr/local/bin/VirtualBox # virtualbox入れた場合はアンインストールして消す | |
$ minikube start --vm-driver=xhyve --memory=2048 --cpus=4 | |
$ kubectl config use-context minikube |
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