sysctl -a | grep swap
$ sudo pkill -HUP -u _windowserver
defmodule Mix.Tasks.ConvertToVerifiedRoutes do | |
@shortdoc "Fix routes" | |
use Mix.Task | |
@regex ~r/(Routes\.)(.*)_(path|url)\(.*?\)/ | |
@web_module MyAppWeb | |
def run(_) do | |
Path.wildcard("lib/**/*.*ex") |
There are trhee diffrent time zones in rails
UTC
, but do not change itconfig.time_zone
should be set when an app dose not support multiple time zones{ | |
"lib/**/views/*_view.ex": { | |
"type": "view", | |
"alternate": "test/{dirname}/views/{basename}_view_test.exs", | |
"template": [ | |
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}View do", | |
" use {dirname|camelcase|capitalize}, :view", | |
"end" | |
] | |
}, |
#!/bin/bash | |
# | |
# Linter Elixir files using Credo. | |
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new | |
# | |
# Config | |
# ------ | |
# credo.terminate | |
# The credo exit status level to be considered as “not passed”—to prevent | |
# git commit until fixed. |
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
Open the console to see detalied info about what's going on
module DryJsonSchema | |
# Transforms a dry-validation form to json-schema-compatible objects (hash or array) | |
# Usage: | |
# DryJsonSchema::Converter.(my_form) | |
# => { :type => :object, | |
# :properties => { :abc => { :type => :integer }, | |
# :xyz => { :type => :integer } | |
# }, | |
# :required => [:abc]} | |
class Converter |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |