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
// sbt 0.10 parent project definition | |
import sbt._ | |
imoprt Keys._ | |
object General { | |
val settings = Defaults.defaultSettings ++ Nicol.engineSettings ++ Seq ( | |
organization := "com.github.scan", | |
version := "0.1.0.1", |
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
# HTTP Status Cats | |
# Apache (htaccess) config created by @dave1010 | |
# Licensed CC BY 2.0 | |
# Images CC BY 2.0, from GirlieMac's photostream: | |
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/ | |
# Usage: copy save this file as .htaccess or add it to your httpd.conf | |
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>' |
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
seq(WebPlugin.webSettings :_*) | |
scalaVersion := "2.8.1" | |
libraryDependencies ++= Seq( | |
"net.liftweb" %% "lift-webkit" % "2.3" % "compile", | |
"net.liftweb" %% "lift-mapper" % "2.3" % "compile", | |
"org.mortbay.jetty" % "jetty" % "6.1.22" % "jetty,test", | |
"ch.qos.logback" % "logback-classic" % "0.9.26", | |
"junit" % "junit" % "4.5" % "test", |
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 myproject.comet | |
import net.liftweb._ | |
import actor.LiftActor | |
import common.{Full, Empty, Box} | |
import http._ | |
import js.JE._ | |
import js.JE.JsArray._ | |
import js.JE.JsRaw._ | |
import js.JsCmds._ |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Monad.Trans | |
import Network.Wai.Handler.Warp (run) | |
import Network.Wai | |
import Network.HTTP.Types (statusOK) | |
import Data.Enumerator ((>>==), ($$)) | |
import qualified Data.Enumerator as E |
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
#!/bin/bash | |
# | |
# -------------------------------------------------------------------------------------- | |
# http://blog.gantrithor.com/post/12535461464/carefree-coffeescript-auto-compiler-part-3 | |
# -------------------------------------------------------------------------------------- | |
DIR_ROOT="$(cd "$(dirname "$0")" && pwd)" | |
function compile_tree() { | |
find "$1" -name "*.coffee" -type f | while read PATH_COFFEE; do |
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
module Main where | |
import Data.List | |
main = interact epicWin | |
epicWin :: String -> String | |
epicWin s = let x :: Integer | |
x = read (head (lines s)) | |
in (show $ div (getTotal (tail (lines s))) x) ++ "\n" |
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
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecordWildCards #-} | |
module Snap.Snaplet.Auth.Backends.MongoDB | |
( initMongoAuth | |
) where | |
------------------------------------------------------------------------------ | |
import Control.Arrow |
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
require 'redis' | |
# SADD key, member | |
# Adds the specified <i>member</i> to the set stored at <i>key</i>. | |
redis = Redis.new | |
redis.sadd 'my_set', 'foo' # => true | |
redis.sadd 'my_set', 'bar' # => true | |
redis.sadd 'my_set', 'bar' # => false | |
redis.smembers 'my_set' # => ["foo", "bar"] |
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 System.Random | |
import System.Console.GetOpt | |
import System.Environment(getArgs, getProgName) | |
type Coord = (Int,Int) | |
type Range = (Int,Int) | |
type Area = (Coord,Coord) -- Upper-left and lower-right bounds. |
OlderNewer