I hereby claim:
- I am a-wortman on github.
- I am iximeow (https://keybase.io/iximeow) on keybase.
- I have a public key whose fingerprint is 4DFE 1A27 B8E0 9198 755B 339F BDA6 8873 AF27 D00E
To claim this, I am signing this object:
| #! /bin/bash | |
| # | |
| # wondering how long bash would take to break https://github.com/Dirktheman/rsa-codeigniter-library/blob/master/application/libaries/Rsa.php#L33-L87 | |
| # answer: not long. | |
| # | |
| # > time ./test.sh | |
| # #primes found: | |
| # p: 9473, q: 9479 | |
| # | |
| # real 0m2.832s |
| object X extends App { | |
| def uniq[T](x: T) = | |
| new { | |
| type Q = this.type | |
| def e(x: Q) = () | |
| def q2(x: Q): String = "hello!" | |
| } | |
| val x = uniq(1) | |
| val y = uniq(1) |
| // Wanted to ensure complete() was only called with a certain response type, to give guarantees about api response structure | |
| // (no accidental "returned a string when it should be json!" or "didn't actually give a body when I should have") | |
| trait CustomRouteDirectives extends spray.routing.directives.RouteDirectives { | |
| import spray.httpx.marshalling.ToResponseMarshallable | |
| import spray.httpx.marshalling.ToResponseMarshallable.{isMarshallable => _} | |
| import spray.httpx.marshalling.ToResponseMarshaller | |
| import spray.httpx.marshalling.ToResponseMarshaller.{ | |
| eitherMarshaller, | |
| futureMarshaller, | |
| liftMarshaller, |
| fn main() { | |
| let x: &Expr<&ValT> = &Unit::<&ValT> { | |
| expr: &IntValue { size: 5 } | |
| }; | |
| } | |
| trait ValT {} | |
| trait Expr<T> {} |
| package net.iximeow | |
| import scala.slick.driver.SQLiteDriver.simple._ | |
| package object slick { | |
| var instanceNum = 0; | |
| def table(args: String*) = { | |
| val xs = args.toSeq | |
| var str = "" | |
| str += s"class T${instanceNum}(tag: Tag) extends Table[(${xs.mkString(", ")})](tag, ${'"'}t${instanceNum}${'"'}) {" |
| object foo extends App { | |
| case class Elem(a: Int, b: String, c: Int) | |
| val l = Elem(1, "asf", 2) | |
| trait R[T] { | |
| def r(x: T): T | |
| } | |
| object defaultConvs extends Poly1 { |
| trait Lazy[T] { | |
| def value: T | |
| def map[U](f: T => U): Lazy[U] | |
| def flatten[U](implicit lazyConv: (=> T) => Lazy[U]): Lazy[U] | |
| def flatMap[U](f: T => Lazy[U]): Lazy[U] | |
| } | |
| object Lazy { | |
| implicit def lazyIdentity[A]: (=> Lazy[A]) => Lazy[A] = (old) => Lazy { old.value } |
| import Data.List.Split | |
| euler :: [[Int]] -> Int | |
| euler a = head (head (collapse a)) | |
| collapse :: [[Int]] -> [[Int]] | |
| collapse a = if length a > 1 then | |
| collapse ((init (init a)) ++ [euler18max (last a) (last (init a))]) else a | |
| --We ALWAYS want b to be one larger than a |
I hereby claim:
To claim this, I am signing this object:
| implicit val byteOps: BitOps[Byte] = new BitOps[Byte] { | |
| def >>>(t: Byte, x: Int): Byte = (t >>> x).toByte | |
| def |(a: Byte, b: Byte): Byte = (a | b).toByte | |
| def &(a: Byte, b: Byte): Byte = (a & b).toByte | |
| //Need to put this in an `ArithmeticOps` or something, but this is ok for now | |
| def +(a: Byte, b: Byte): Byte = (a + b).toByte | |
| } | |
| implicit class WithBitOpts[T : BitOps](x: T) { | |
| def >>>(b: Int): T = implicitly[BitOps[T]].>>>(x, b) |