This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # get the current skill id | |
| SKILL_ID=`cat .ask/config | grep skill_id | awk '{ print $2 }' | sed -e 's#"\([^"]*\)",#\1#g'` | |
| # get model from current skill | |
| ask api get-model -s ${SKILL_ID} -l "en-US" | |
| # update local changes to model to the server | |
| ask api update-model -s ${SKILL_ID} -l "en-US" -f models/en-US.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Transactor | |
| def self.perform(*args, &bloque) | |
| t = Transaction.new(args) | |
| begin | |
| bloque.call(*args) | |
| t.commit() | |
| rescue Exception => e | |
| t.undo() | |
| raise e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rspec' | |
| require_relative './en-clase' | |
| describe 'trasacciones de objetos' do | |
| # ESTOS TESTS ERAN DE LA PRIMERA PARTE QUE LUEGO ROMPIMOS :P | |
| # class Persona | |
| # attr_accessor :edad | |
| # def initialize(edad) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >> >> require_relative("./src/age.rb") | |
| => true | |
| >> >> atila = Guerrero.new | |
| => #<Guerrero:0x00007fc5d20a37d8 @potencial_ofensivo=20, @energia=100, @potencial_defensivo=10> | |
| >> >> atila.class | |
| => Guerrero | |
| >> >> atila.class.name | |
| => "Guerrero" | |
| >> >> atila.class | |
| => Guerrero |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export lastDate="Nov 8" | |
| ls -lArthF | grep -v "/$" | grep -v "$lastDate" | awk '{ print $9 }' | xargs rm -rf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ar.edu.unq.o3.funciones { | |
| object Funciones { | |
| def sumar(a: Int, b: Int): Int = a + b | |
| def _sumar2 = (a: Int, b: Int) => a + b | |
| def _sumar3: (Int, Int) => Int = (a, b) => a + b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| BRANCH=master | |
| # fix repo URL from https to ssh | |
| REPO_SSH_URL=`git remote -v | head -n 1 | sed -e 's#.*@\([^\/]*\)/\(.*\) (fetch)#git@github.com:\2#g'` | |
| git remote set-url origin $REPO_SSH_URL | |
| # create new branch from initial commit | |
| git checkout -b entrega-final c5e3042f72c78097a3428343478018d5996568c2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package aves { | |
| trait ConEnergia { | |
| private var energia = 200.0 | |
| def reducirEnergia(cuanto: Double) = { | |
| energia -= cuanto | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const jugarCartaEnMano = (manos, carta, turno) => | |
| adjust( | |
| actualizarMano(carta, turno), | |
| manos.findIndex(m => !m[turno]) | |
| )(manos) | |
| const actualizarMano = (carta, turno) => pipe( | |
| mergeDeepLeft({ [turno]: carta }), | |
| mano => ({ | |
| ...mano, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const ResultadoMano = { | |
| GANADOR: 'ganador', | |
| PERDEDOR: 'perdedor', | |
| EMPATE: 'empate' | |
| } | |
| export const Palo = { | |
| BASTOS: 'bastos', | |
| OROS: 'oros', |