Skip to content

Instantly share code, notes, and snippets.

View matheussilvasantos's full-sized avatar
🐧
What you call clean code was invented by guys like me

Matheus matheussilvasantos

🐧
What you call clean code was invented by guys like me
View GitHub Profile

Primeiramente, lembremos que as formas nominais do verbo servem para formar tempos compostos (vou fazer, estou fazendo, tenho feito).

find . -iname "*.mp3" -maxdepth 1 | ag -o "audio.*.mp3" | xargs -I{} ffmpeg -ss 00:00:08 -i {} -c copy cut/{}
module REST
def self.OAuth(client)
REST::OAuth.new(client)
end
class OAuth < Module
def initialize(client)
@client = client
freeze
end
@matheussilvasantos
matheussilvasantos / handler.rb
Created May 2, 2019 16:56
Campo harmônico
require 'json'
@acordes ||= Hash.new {|h,k| h[k] = [] }
def lambda_handler(event:, context:)
@acordes ||= Hash.new {|h,k| h[k] = [] }
params = JSON.parse(event["body"])
puts "[LOGGER] #{params}"
session = params["session"]
acorde = params["queryResult"]["parameters"]["acorde"]
@matheussilvasantos
matheussilvasantos / search_form.rb
Last active January 18, 2019 13:08
Hanami validations using an optional array with Hashs in it.
require 'hanami/validations/form'
class SearchForm
include Hanami::Validations::Form
validations do
optional(:filter).maybe do
schema do
optional(:category).each do
schema do
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'jistr/vim-nerdtree-tabs'
var gulp = require("gulp");
var sass = require("gulp-sass");
var useref = require("gulp-useref");
var uglify = require("gulp-uglify");
var gulpIf = require("gulp-if");
var cssnano = require("gulp-cssnano");
var imagemin = require("gulp-imagemin");
var cache = require("gulp-cache");
var del = require("del");
var browserSync = require("browser-sync").create();