TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 mainTL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main./lib/enum.js
module.exports = Object.freeze({
IS_A_THING: 1,
IS_ANOTHER_THING: 2
});
./lib/main.js
var myEnum = require('./enum');
Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.
The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows
the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.
Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to
a specific version, you will need to compile it yourself. Then kerl and exenv are your best friends.
Rails provides an API that we can use to create our own renderers. In this chapter we explore the API as we modify the render() method to accept :pdf as an option and return a PDF created with Prawn.
To create a new plugin just run the following:
$ rails plugin new my_plugin
TODO Complete notes
def solution(x, arr)
k = 0
n = arr.length
condition = -> (a) { a.eql? x}
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # This is how I used it: | |
| # $ cat ~/.bash_history | bash-history-to-zsh-history >> ~/.zsh_history | |
| import sys | |
| def main(): |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| class MyResource | |
| include HTTParty | |
| debug_output $stdout # <= will spit out all request details to the console | |
| #... | |
| end |
Imprima os números de 1 a 100. Troque os números múltiplos de 5 por Peg, os múltiplos de 7 por car, e os múltiplos de 35 por Pegcar.
Em outras palavaras temos um lista de dados, que precisamos processar e gerar uma nova lista de dados, de acordo com a regra de negócio.
Um cenário ideal pra utilização do #map então segue uma primeira solução para o exercício.
result_a =
(1..100).map{ |n|