As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/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(): |
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
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.
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 main| <?php | |
| $cb = function ($fn) { | |
| return $fn; | |
| }; | |
| echo <<<HEREDOC | |
| Hello, {$cb(ucfirst('world'))} | |
| HEREDOC; |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
| AWS region code | AWS region name | Number of AZs | AZ names |
|---|---|---|---|
| us-east-1 | Virginia | 4 | us-east-1a, us-east-1b, us-east-1c, us-east-1e |
| us-west-1 | N. California | 2 | us-west-1a, us-west-1b |
| us-west-2 | Oregon | 3 | us-west-2a, us-west-2b, us-west-2c |
| eu-west-1 | Ireland | 3 | eu-west-1a, eu-west-1b, eu-west-1c |
| eu-central-1 | Frankfurt | 2 | eu-central-1a, eu-central-1b |
| ap-southeast-1 | Singapore | 2 | ap-southeast-1a, ap-southeast-1b |
| ap-southeast-2 | Sydney | 2 | ap-southeast-2a, ap-southeast-2b, ap-southeast-2c |
| ap-northeast-1 | Tokyo | 2 | ap-northeast-1a, ap-nort |
| # Simple approach to sending email from the Rails console | |
| # Implementation idea courtesy of Steve Klabnik | |
| # http://blog.steveklabnik.com/posts/2012-09-09-random-ruby-tricks--class-new | |
| # Create the mailer class with a block and assign to a variable | |
| mailer = Class.new(ActionMailer::Base) do | |
| def example_message | |
| mail(to: "[email protected]", from: "[email protected]", subject: "Example Message") do |format| | |
| format.text { render text: "Example message body" } | |
| end |