start new:
tmux
start new with session name:
tmux new -s myname
There's a couple of ways, one way is
SPC /
and type in your search stringSPC x S
and search string - where x is your scope indicator (p for project, d for directory, etc..)C-c C-e
inside the helm buffer to put all your match occurences and puts them into a special buffer called the edit buffer or something like thatC-c C-c
to commit your changes.S.O.L.I.D. - for roughly a decade, many have learned and sought to apply these principles in the context of
Object Oriented Programming. As Functional languages like Elixir become more mainstream, one might wonder
if these concepts are still applicable and, if so, seek out concrete examples that demonstrate
their merit in this new functional world. Come prepared to tour each of the S.O.L.I.D. design principles and to
examine how S.O.L.I.D. principles not only apply to Object Oriented Programming, but also to Functional Programming in Elixir.
require 'rails_helper' | |
describe Rack::MyMiddleware do | |
let(:app) { proc { [200, {}, ['Hello Dave']] } } | |
let(:stack) { described_class.new(app) } | |
let(:request) { Rack::MockRequest.new(stack) } | |
context 'A POST request' do | |
#NOTE TIL = this is how I post all the things |
# 1) Created User and Run models first (generated) | |
# 2) Created the UserRun model (generated) then removed all but Ecto.Schema | |
# 3) Corrected the UserRun model so that it looked like this: | |
defmodule Gatherto.UserRun do | |
use Ecto.Schema | |
schema "users_runs" do | |
belongs_to :user, Gatherto.User #this was VERY important! Before I had field :user_id, :binary_id | |
belongs_to :run, Gatherto.Run #this was VERY important! Before I had field :run_id, :binary_id | |
timestamps() |
find . -name "*.bak" -type f -delete |
# ag <https://github.com/ggreer/the_silver_searcher> | |
# usage: ag-replace.sh [search] [replace] | |
# caveats: will choke if either arguments contain a forward slash | |
# notes: will back up changed files to *.bak files | |
ag -l $1 | xargs perl -pi.bak -e "s/$1/$2/g" | |
# or if you prefer sed's regex syntax: | |
ag -l $1 | xargs sed -ri.bak -e "s/$1/$2/g" |
Go buy a Mac ;) |
iex(11)> foo_int = "123foobar" | |
"123foobar" | |
iex(12)> String.to_integer(foo_int) | |
** (ArgumentError) argument error | |
:erlang.binary_to_integer("123foobar") | |
iex(12)> Integer.parse(foo_int) | |
{123, "foobar"} |
Assertion with == failed | |
code: Words.count("co-operative") == expected | |
lhs: %{"co" => 1, "operative" => 1} | |
rhs: %{"co-operative" => 1} | |
Assertion with == failed | |
code: Words.count("co-operative") == %{"co-operative" => 1} | |
lhs: %{"co" => 1, "operative" => 1} | |
rhs: %{"co-operative" => 1} | |