This file contains hidden or 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 play.api.libs.ws.Response | |
import scala.concurrent.{Future, Promise} | |
import com.ning.http.client._ | |
import com.ning.http.client.{Response => AHCResponse} | |
import com.ning.http.client.AsyncCompletionHandler | |
val url = "http://google.com" | |
val config = new AsyncHttpClientConfig.Builder() |
This file contains hidden or 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 scalaz._ | |
/** | |
* Provides type aliases and utilities for working with state disjunctions. | |
* | |
* A state disjunction is a function `S => F[(S, L \/ R)]` wrapped in the StateT and EitherT monad | |
* transformers. | |
* | |
* See `StateDisjunctionT` and `StateDisjunction` for more information. |
This file contains hidden or 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
#!/usr/bin/env python | |
'''A script to calculate adler32 checksum of given files''' | |
BLOCKSIZE=256*1024*1024 | |
import sys | |
from zlib import adler32 | |
for fname in sys.argv[1:]: | |
asum = 1 | |
with open(fname,"rb") as f: |
This file contains hidden or 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 pl.irc | |
import org.jibble.pircbot.PircBot | |
import dispatch._ | |
import Http._ | |
import net.liftweb.json._ | |
import net.liftweb.json.JsonDSL._ | |
import net.liftweb.json.Printer.{compact} | |
import java.io.{PrintStream, ByteArrayOutputStream} |
This file contains hidden or 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
urlencode() { | |
# urlencode <string> | |
old_lc_collate=$LC_COLLATE | |
LC_COLLATE=C | |
local length="${#1}" | |
for (( i = 0; i < length; i++ )); do | |
local c="${1:$i:1}" | |
case $c in |
NewerOlder