Skip to content

Instantly share code, notes, and snippets.

View micke's full-sized avatar
⌨️
Clacking

Micke Lisinge micke

⌨️
Clacking
View GitHub Profile
@micke
micke / benchmark.rb
Created March 18, 2020 16:56
Benchmarks the valid_email2 gem using a YAML file vs TXT as datastore
require "yaml"
require "benchmark"
require "benchmark/memory"
iterations = 50
Benchmark.bm do |x|
x.report "YAML:" do
iterations.times do
YAML.load_file("config/disposable_email_domains.yml")

Keybase proof

I hereby claim:

  • I am micke on github.
  • I am lisinge (https://keybase.io/lisinge) on keybase.
  • I have a public key whose fingerprint is 456D F1A3 8F83 95C7 09B6 69E2 9168 A401 9C57 9B81

To claim this, I am signing this object:

@micke
micke / keybase.md
Created April 6, 2016 09:21
keybase.md

Keybase proof

I hereby claim:

  • I am lisinge on github.
  • I am lisinge (https://keybase.io/lisinge) on keybase.
  • I have a public key whose fingerprint is 5EF3 BBDF 0649 B0B1 CA8C 569D AEFE 4841 25C6 653D

To claim this, I am signing this object:

@micke
micke / implementation.scala
Created October 22, 2014 09:11
Super simple scala wrapper around org.apache.commons.codec.binary.Base64
package utils
import org.apache.commons.codec.binary.{ Base64 => ApacheBase64 }
object Base64 {
def decode(encoded: String) = new String(ApacheBase64.decodeBase64(encoded.getBytes))
def encode(decoded: String) = new String(ApacheBase64.encodeBase64(decoded.getBytes))
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.13528014719486237</real>
<key>Green Component</key>
<real>0.12312769144773483</real>