Skip to content

Instantly share code, notes, and snippets.

View anchietajunior's full-sized avatar
💭
Working Hard

José Anchieta anchietajunior

💭
Working Hard
View GitHub Profile
name = "Mary"
3.times do
prefix = "My name is"
name = "John"
p "#{prefix} #{name}"
end
name = "Mary"
3.times do
prefix = "My name is"
p "#{prefix} #{name}"
end
@anchietajunior
anchietajunior / initrepo.shell
Created October 31, 2019 12:44
Init a new repo
git init
git add .
git commit -m "First commit"
class Subscription
def initialize(user)
@user = user
end
def call
create_payment!
create_invoice!
rescue StandardError => e
puts e.message
class Subscription
def initialize(user)
@user = user
end
def call
create_payment!
create_invoice!
rescue StandardError => e
puts e.message
cd projectname
npm run serve
vue create projectname
@anchietajunior
anchietajunior / vue-cli.sh
Last active July 13, 2019 14:42
Install Vue-CLI
npm install -g @vue/cli
# OR
yarn global add @vue/cli
@anchietajunior
anchietajunior / operador_condicional_atribuicao.rb
Last active January 3, 2019 02:40
Operador condicional em Ruby
protagonista ||= "Deadpool"
coadjuvante ||= "Cable"
protagonista = nil
protagonista = "Deadpool" if protagonista.nil? || !protagonista
coadjuvante = false
coadjuvante = "Cable" if coadjuvante.nil? || !coadjuvante