Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
defmodule MyApp.ReplicatedConCache do | |
@moduledoc """ | |
Utility to replicate local ConCache operations via Phoenix.PubSub. | |
Only those ConCache functions that we need are replicated. | |
Prerequisites: | |
- for all relevant cache ids, there is a ConCache instance running on | |
each node connected to the PubSub system | |
- these ConCache instances are all configured same (TTL etc.) |
defmodule Super.RepoTest do | |
use Super.DataCase, async: true | |
require Logger | |
@skipped_schemas [UserService.User] | |
defp tenant_schemas do | |
{:ok, mods} = :application.get_key(:super, :modules) | |
Enum.map(mods, fn mod -> |
# Clean the database | |
DROP TABLE IF EXISTS _orders CASCADE; | |
DROP TABLE IF EXISTS _users CASCADE; | |
DROP TABLE IF EXISTS orders CASCADE; | |
DROP TABLE IF EXISTS users CASCADE; | |
# Build the database (for hard deletion) | |
CREATE TABLE users ( | |
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | |
name text NOT NULL |
# The Problem: Marketing Team requires to crosscheck the list of products available | |
# in all the websites of the Company | |
# Input: A Excel File that contains "Model" and "Item Path" columns | |
# Requirements: Models are duplicated, Remove the duplicated models and keep the Item Path | |
# The problem: The cells in the "Model" columns contains extra spaces which makes all the models be unique | |
# even if they are not | |
# This script will remove extra spaces, remove the cells duplicated by keeping the first item found | |
# author: Soraya Ruiz | |
# date of creation: 27-08-2021 |
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
-module(connection). | |
-behaviour(gen_statem). | |
-export([start_link/1, request/2]). | |
-export([callback_mode/0, init/1]). | |
-export([disconnected/3, connected/3]). | |
%% Public API. | |
start_link(Opts) -> |
Add the following in .zshrc: | |
... | |
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
... | |
### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
pasteinit() { | |
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
## Context + metadata | |
shared_context 'Logged as a user', role: true do | |
let(:user) { |example| create :user, example.metadata[:role] } | |
before { login_as user } | |
end | |
scenario "Login as a client", role: :client | |
scenario "Login as a customer", role: :customer | |
scenario "Login as an admin", role: :admin |
Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
In your command-line run the following commands:
brew doctor
brew update