Skip to content

Instantly share code, notes, and snippets.

View shivakomat's full-sized avatar
🤑
Plan, Manage, Collaborate and Execute

Shiva Komatreddy shivakomat

🤑
Plan, Manage, Collaborate and Execute
  • Pinterest
  • San Francisco, California
View GitHub Profile
@shivakomat
shivakomat / EmailMessage.scala
Created November 2, 2015 01:00 — forked from PanzerKunst/EmailMessage.scala
Small modification of Raúl Raja's Scala code to sent emails
import scala.concurrent.duration.FiniteDuration
/**
* The email message sent to Actors in charge of delivering email
*
* @param subject the email subject
* @param recipient the recipient
* @param from the sender
* @param text alternative simple text
* @param html html body
@shivakomat
shivakomat / Schema2CaseClass.scala
Created April 28, 2018 07:36 — forked from yoyama/Schema2CaseClass.scala
Generate case class from spark DataFrame/Dataset schema.
/**
* Generate Case class from DataFrame.schema
*
* val df:DataFrame = ...
*
* val s2cc = new Schema2CaseClass
* import s2cc.implicit._
*
* println(s2cc.schemaToCaseClass(df.schema, "MyClass"))
*
@shivakomat
shivakomat / gist:c788d7d6007d1736cf5932c138d113b0
Created June 20, 2020 05:17 — forked from aberke/gist:042eef0f37dba1138f9e
AngularJS module for phonenumber inputs - Includes custom directive that formats telephone number input values as well as filter for format them in text.
/***************************************************
----------------------------------------------------
Author: Alexandra Berke (aberke)
Written: Summer 2014
----------------------------------------------------
Formats the phonenumber as (222) 333-4444 within the input element
Binds only the number 2223334444 to the model