https://github.com/AGWA/git-crypt
Adiciona uma camada de criptografia de arquivos em repositórios git.
require "active_record" | |
require "sqlite3" | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'sqlite3', | |
:host => "localhost", | |
:database => ':memory:' | |
) | |
ActiveRecord::Schema.define do |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'u-case' | |
gem 'pry' | |
end | |
class Sum < Micro::Case | |
attributes :a, :b |
// Steps: | |
// 1. Open your browser console | |
// 2. Enable artoo.js (http://medialab.github.io/artoo/) | |
// 3. Replace USER_OR_ORG and REPO in the COMMIT_URL and COMPARE_URL | |
// 4. Copy paste the following script in the console | |
var COMMIT_URL = 'https://gitlab.com/USER_OR_ORG/REPO/-/commit/'; | |
var COMPARE_URL = 'https://gitlab.com/USER_OR_ORG/REPO/-/compare/'; | |
var $rows = artoo.$('.deploys tr').filter(':not(.table-title)'); |
<% if @bar %> | |
<p><%= yield %></p> | |
<% end %> |
# | |
# Métodos globais | |
# | |
def calc_sum(a, b) | |
a + b | |
end | |
puts calc_sum(1, 3) | |
# Classes com métodos estáticos |
https://github.com/AGWA/git-crypt
Adiciona uma camada de criptografia de arquivos em repositórios git.
# frozen_string_literal: true | |
# == Gemfile == | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'u-test', '0.9.0' |
.tool-versions |
defmodule Slug1 do | |
def slugify(input), do: map_slug(input, %{pattern: ~r/\s+/}) | |
def slugify2(input), do: map_slug(input, %{pattern: " "}) | |
defp map_slug(input, %{pattern: pattern}) do | |
input | |
|> to_string() | |
|> String.trim() | |
|> String.downcase() |