Skip to content

Instantly share code, notes, and snippets.

View sujithjay's full-sized avatar
🥑

Sujith Jay Nair sujithjay

🥑
View GitHub Profile
@Mortimerp9
Mortimerp9 / gist:5649109
Created May 25, 2013 13:50
"cheap" implementation of an immutable IndexedSeq backed by an array. `b` looks like an Array according to the types, but can't be modified nor cast back to a mutable Array.
import scala.reflect.ClassTag
import scala.collection.mutable.WrappedArray
import scala.collection.mutable.ArrayLike
def ASeq[T](elt: T*)(implicit ct: ClassTag[T]): IndexedSeq[T] = {
val a = elt.toArray.clone
a.deep.asInstanceOf[IndexedSeq[T]]
}
val a = Array(1,2,3) //> a : Array[Int] = Array(1, 2, 3)
@oliveratgithub
oliveratgithub / made-with-love.html
Last active November 11, 2024 18:59
Various snippets to add "Made with love" to your website using HTML, CSS and JavaScript
<!-- Example #1 - no styling -->
Made with ❤ in Switzerland
Made with ♥ in Switzerland
Made with ♡ in Switzerland
Made with ❤️ in Switzerland
Made with ♥️ in Switzerland
<!-- Example #2 - inline-styled ❤ -->
Made with <span style="color: #e25555;">&#9829;</span> in Switzerland
Made with <span style="color: #e25555;">&hearts;</span> in Switzerland