Skip to content

Instantly share code, notes, and snippets.

View charlyraffellini's full-sized avatar
:shipit:

Carlos Esteban Raffellini charlyraffellini

:shipit:
View GitHub Profile
You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-08-08
Image input capabilities: Enabled
Personality: v2
Do not reproduce song lyrics or any other copyrighted material, even if asked.
You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor.
Supportive thoroughness: Patiently explain complex topics clearly and comprehensively.
Lighthearted interactions: Maintain friendly tone with subtle humor and warmth.
theory
Consensus_Demo
imports
Network
begin
datatype 'val msg
= Propose 'val
| Accept 'val
@charlyraffellini
charlyraffellini / java-setup.md
Created July 13, 2019 13:10 — forked from starlinq/java-setup.md
How to install Java JDK8 in Ubuntu 16.04

How to install Java JDK8 in Ubuntu 16.04

Let's consider a JDK8 installation using 2 different versions: default and Oracle. The default version is easiest because it is packaged with Ubuntu.

There is default Java installation called the JDK (Java Development Kit). The JDK is usually only needed if you are going to to do some software developmwent using Java or if some software requires it. The JDK does contain the JRE.

Installing the default JDK

@charlyraffellini
charlyraffellini / GitTutorial.md
Last active February 18, 2019 16:31
GitInDeepTutorial #git #vcs

The commit sha

Simple commit without parents:

sha1(
    commit message  => "initial commit"
 committer => Christoph Burgdorf 
@charlyraffellini
charlyraffellini / DebugSbtTestsWithIDEA.md
Last active February 19, 2019 13:54
Debugging spark applications. #spark #spark-class # spark-submit #internals #debugging

Debug console sbt test run with IDEA

  • Create a Remote debug configuraion listening in port 5005
  • In the terminal run sbt -jvm-debug 5005
  • Once sbt started start debugging the run/debug configuration
  • Now you can debug tests in IDEA running them through the command line: {file:/C:/Users/my.user/source/repos/my-repo/}my-sbt-project/testOnly com.my.spark.project.SparkShould -- -t "landed data should be outputted in parquet format"

image

@charlyraffellini
charlyraffellini / ScallopCommandHandler.scala
Last active February 2, 2019 00:25 — forked from omnisis/gist:1252de6ea9f054cd84ae
Example Scallop CommandHandler
import java.io.File
import org.rogach.scallop.{ScallopConf, ScallopOption, Subcommand}
case class ScallopConfig(arguments: Seq[String],
runs: Subcommand = Runs(),
dbfs: Subcommand = Dbfs(),
adf: Subcommand = Datafactory(),
trigger: Subcommand = Trigger()) extends ScallopConf(arguments) {
addSubcommand(dbfs)

Print classpath

  • Compile task: sbt "inspect run" "show compile:fullClasspath"
  • Run task: sbt "inspect run" "show runtime:fullClasspath"

Exclude jar from runtime class path - provided

Using "provided" attribute

val sparkSql = "org.apache.spark" %% "spark-sql" % sparkSqlV % "provided"

@charlyraffellini
charlyraffellini / PowerShell Customization.md
Created August 14, 2018 13:38 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

# Get all the dbs names for the first sql server
az sql db list --id $(az sql server list | jq --raw-output '.[0].id') | jq '.[].name'
# Count service principal
az ad sp list | jq '. | length'
# Count application service principal
az ad sp list | jq '[ .[] | select(.servicePrincipalType == "Application") ] | length'
# Count non application service principal