This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
us.rdx2.lgtvsdp.com | |
us.info.lgsmartad.com | |
us.ibs.lgappstv.com | |
us.lgtvsdp.com | |
ad.lgappstv.com | |
smartshare.lgtvsdp.com | |
ibis.lgappstv.com | |
# added after fork | |
# from https://www.reddit.com/r/pihole/comments/6qmpv6/blacklists_for_lg_webos_tvs/ and others |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def radixSort(arr: Seq[Int]): Seq[Int] = { | |
def fn(state: Seq[Int], d: Int): Seq[Int] = { | |
val ten_power_d = Iterator.fill(d)(10).product | |
val buckets = state.groupBy(_ / ten_power_d % 10).toMap | |
buckets.keys.toSeq.sorted.foldLeft(Seq.empty[Int]) { case (acc, i) => | |
acc ++ buckets(i) | |
} | |
} | |
val digits = Iterator.iterate(arr) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function* readLine(stream) { | |
const EOL = require('os').EOL; | |
const Fs = require('fs'); | |
const buf = new Buffer(1024); | |
stream.resume(); | |
stream.setEncoding('ascii'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val des = scala.concurrent.ExecutionContext.global | |
import scala.concurrent._ | |
import duration._ | |
def ct = Thread.currentThread.getName | |
val n = Runtime.getRuntime.availableProcessors | |
def hogThread(sec:Int) = future { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="http://www.osinka.ru/?utm_source=people&utm_medium=button&utm_content=osinka_banner_200x150_1&utm_campaign=110125" | |
title="Осинка.ру - все о моде, шитье и рукоделии"><img | |
src="http://www.osinka.ru/info/banners/osinka_banner_200x150_1.png" | |
width="200" | |
height="150" | |
border="0"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.osinka.subset.examples | |
/** | |
* Data model from this MongoDB doc page: | |
* http://www.mongodb.org/display/DOCS/Updating#Updating-The%24positionaloperator | |
*/ | |
// Use :paste mode | |
import com.mongodb._ | |
import com.osinka.subset._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.io._ | |
import collection.JavaConversions._ | |
import com.mongodb._ | |
import com.osinka.subset._ | |
import SmartValues._ | |
// we want to store it in MongoDB. ok.. | |
val mongo = new Mongo("192.168.0.164") | |
val db = mongo getDB "test" | |
val coll = db getCollection "timeline" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.osinka.i18n | |
import java.util.{Locale,ResourceBundle} | |
import collection.JavaConversions._ | |
import net.liftweb.common.Box._ | |
import net.liftweb.util.{BundleBuilder,PCDataXmlParser} | |
/** | |
* ResourceBundle.Control implementation for Liftweb resources | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait PostStart { actor: Actor => | |
def postStart: Unit | |
override def preStart { | |
super.preStart | |
actor.become { | |
case "PostStart" => try { postStart } finally { actor.unbecome } | |
} | |
actor.self ! "PostStart" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import reflect.{Manifest, ClassManifest} | |
import org.scalatest.matchers.{Matcher,MatchResult} | |
trait CustomMatchers { | |
/** | |
* Based on http://daily-scala.blogspot.com/2010/01/overcoming-type-erasure-in-matching-1.html | |
*/ | |
class ConformMatcher[A](implicit m: Manifest[A]) extends Matcher[AnyRef] { | |
override def apply(obj: AnyRef) = { | |
def deepConformance[B,C](desired: Manifest[B], actual: Manifest[C]): Boolean = { |
NewerOlder