(Also see [remarkable][], the markdown parser created by the author of this cheatsheet)
"""""""""""""""""""""""""""""""""""""""" | |
" CONFIGURAÇÕES GOGS - WWW.GOGS.COM.BR " | |
"""""""""""""""""""""""""""""""""""""""" | |
set number " Numera as linhas | |
set linebreak " Quebra a linha sem quebrar a palavra | |
set nobackup " Não salva arquivos de backup~ | |
set wildmode=longest,list " Completa o comando com TAB igual o bash | |
set ignorecase " Ignora o case sensitive nas buscas | |
set smartcase " Se tiver alguma letra maiúscula, ativa o case sensitive | |
set gdefault " Sempre substitui todas as palavras, não só a primeira |
require 'thor' | |
require "sub" | |
class MyApp < Thor | |
desc "parentcommand SUBCOMMAND", "Some Parent Command" | |
subcommand "sub", Sub | |
end | |
MyApp.start |
Instead of | |
rails server | |
do: | |
rails s -d | |
then to kill it, find which process is using the port: | |
lsof -i :3000 | |
finally, kill the process: | |
kill -9 $(lsof -i :3000 -t) |
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
Escolhi tratar sobre esse assunto hoje simplesmente porque foi uma das primeiras coisas que me perguntei "como eu faço isso?" no mundo ruby. Acredito que muita gente se pergunte a mesma coisa e espero que eu possa ajudar em algo para elas. 😀
Bem, se você é um programador java, você chama sua gem de jar, se você é um programador C#, você chama de dll. Resumindo, é uma lib, uma biblioteca contendo códigos que você pode reaproveitar importando em outros projetos.
E usar gems no ruby é muito fácil, se você já deu uma brincada com rails por exemplo, é só você adicionar o código gem 'nome_da_gem'
no arquivo Gemfile
que está no root, depois executar o comando bundle install
para baixar sua gem do repositório e pronto, só sair usando a biblioteca!
namespace :routes do | |
desc 'Print out all defined routes in CSV format.' | |
task :csv => :environment do | |
class CSVFormatter | |
def initialize | |
@buffer = [] | |
end | |
def result |
OSX Sierra version 10.12.6
if you are getting error like
ERROR: Could not find a valid gem '<some package name>' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect retur
test your TLS v1.2 support