https://github.com/AGWA/git-crypt
Adiciona uma camada de criptografia de arquivos em repositórios git.
class TaskArgumentsCalculator | |
def initialize(operator) | |
@operator = operator | |
end | |
def call(_task, args) | |
puts map_numbers(args).reduce(&@operator) | |
end |
raise 'Wrong Ruby version!' unless RUBY_VERSION >= '2.6.0' | |
module Strings | |
Trim = -> str { String(str).strip } | |
Replace = -> (sub, new_sub, str) { String(str).gsub(sub, new_sub) } | |
LowerCase = -> str { String(str).downcase } | |
end | |
# -- Alternative syntax -- | |
Slugify = # Slugify = |
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() |
.tool-versions |
# frozen_string_literal: true | |
# == Gemfile == | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'u-test', '0.9.0' |
https://github.com/AGWA/git-crypt
Adiciona uma camada de criptografia de arquivos em repositórios git.
# | |
# Métodos globais | |
# | |
def calc_sum(a, b) | |
a + b | |
end | |
puts calc_sum(1, 3) | |
# Classes com métodos estáticos |
<% if @bar %> | |
<p><%= yield %></p> | |
<% end %> |
// 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)'); |