Skip to content

Instantly share code, notes, and snippets.

View mvillafuertem's full-sized avatar
💭
😏

mvillafuertem

💭
😏
View GitHub Profile
@mvillafuertem
mvillafuertem / .gitconfig
Created February 1, 2018 15:07 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@mvillafuertem
mvillafuertem / gatling-simple.sc
Created May 8, 2020 13:51 — forked from dacr/gatling-simple.sc
Just ONE ammonite script file to execute a load performance test using gatling ! #ea7a4259-9461-44a8-99fa-1ec6ec3c48ed/cb9ae6dd7c07d7f534a416c586bc5182a8244daa
// summary : Just ONE ammonite script file to execute a load performance test using gatling !
// keywords : scala, gatling, ammonite, scala, load-test, performance
// publish : gist, snippet
// authors : David Crosson
// id : ea7a4259-9461-44a8-99fa-1ec6ec3c48ed
// execution : scala ammonite script (http://ammonite.io/) - run as follow 'amm scriptname.sc'
/*
A performance load script file directly executable using ammonite, run on all OS (linux / Mac / Windows), just install ammonite REPL (http://ammonite.io).
def nodeSpecs(List specs, Closure callback) {
def nodes = [:]
for (item in specs) {
def spec = item
nodes["Spec ${spec}"] = { callback.call(spec) }
}
return nodes
}
@mvillafuertem
mvillafuertem / solving_spark_signature_error.md
Created November 21, 2020 18:43 — forked from hkhamm/solving_spark_signature_error.md
Solving a Spark Invalid signature file digest for Manifest main attributes error

##Solving a Spark error: Invalid signature file digest for Manifest main attributes

When using spark-submit to run a jar, you may encounter this error:

Invalid signature file digest for Manifest main attributes

The error occurs when one of the included libraries in the jar's META-INF directory has a bad signature.

@mvillafuertem
mvillafuertem / MLToyApp.scala
Created December 13, 2020 22:00 — forked from abomm/MLToyApp.scala
Machine Learning application design with Pure Functional ZIO in Scala
package ziomlscoring
import zio._
import ziomlscoring.SizeMyShirt.moduleExperimentFramework.ExperimentFramework
import ziomlscoring.SizeMyShirt.moduleInferenceLogger.InferenceLogger
import ziomlscoring.SizeMyShirt.moduleTShirtSizer.TShirtSizer
import ziomlscoring.SizeMyShirt.sizeMyShirtMicroService
object SizeMyShirt {
case class UserId(value: Long) extends AnyVal
@mvillafuertem
mvillafuertem / day-3.scala
Created June 21, 2021 12:09 — forked from calvinlfer/day-3.scala
Functional Scala: Toronto edition
// Copyright(C) 2018 - John A. De Goes. All rights reserved.
package net.degoes.effects
import scalaz.zio._
import scalaz.zio.console._
import scala.annotation.tailrec
import scala.concurrent.duration._
@mvillafuertem
mvillafuertem / ArgsOps.scala
Created July 3, 2021 21:52 — forked from gwenzek/ArgsOps.scala
Scala parser for programm args
import scala.language.implicitConversions
/**
* @author gwenzek
*
*/
class ArgsOps(ops: Map[String, OptionalParam], val args: Array[String]){
def apply(op: String) = ops(op)
}
@mvillafuertem
mvillafuertem / Workshop.scala
Created October 17, 2021 18:20 — forked from calvinlfer/Workshop.scala
Day 1 and 2 ZIO async and concurrent workshop
package net.degoes.zio
import java.io.IOException
import zio._
import java.text.NumberFormat
import java.nio.charset.StandardCharsets
import zio.blocking.Blocking
import zio.console.Console
@mvillafuertem
mvillafuertem / kubectl-multi-version-brews.md
Created March 16, 2022 13:08 — forked from rdump/kubectl-multi-version-brews.md
kubectl multi-version brews (kubernetes-cli formula)

kubectl multi-version brews

Applicability

The instructions below apply to older versions of Homebrew which still provide switch capability.

For current Homebrew, you'll likely need to keep Versions around, and build locally. Here's my versions repository https://github.com/rdump/homebrew-versions

MacPorts is now keeping versioned installations available as well, by default.

sbt> eval new scala.sys.SystemProperties().foreach(x => println(x))
sbt> eval scala.sys.env.foreach(x => println(x))