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
public class TranslateAPI | |
{ | |
private string TranslateURL { get; set; } | |
public TranslateAPI() | |
{ | |
var appConfig = ConfigurationManager.AppSettings; | |
var baseurl = appConfig["TranslateBaseURL"]; | |
var apiKey = appConfig["TranslateAPIKey"]; |
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
Erlang R14B02 (erts-5.8.3) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false] | |
=PROGRESS REPORT==== 20-Mar-2011::18:18:31 === | |
supervisor: {local,sasl_safe_sup} | |
started: [{pid,<0.34.0>}, | |
{name,alarm_handler}, | |
{mfargs,{alarm_handler,start_link,[]}}, | |
{restart_type,permanent}, | |
{shutdown,2000}, |
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
(deftest valid-emails | |
(are [email] (vali/is-email? email) | |
"testword@domain.com" | |
"test+word@domain.com" | |
"test_word@domain.com" | |
"test'word@domain.com" | |
"test`word@domain.com" | |
"test#word@domain.com" | |
"test=word@domain.com" | |
"test|word@domain.com" |
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
// C# Comb Guid generation | |
// Found at http://stackoverflow.com/questions/665417/sequential-guid-in-linq-to-sql/2187898#2187898 | |
Guid GenerateComb() | |
{ | |
byte[] destinationArray = Guid.NewGuid().ToByteArray(); | |
DateTime time = new DateTime(0x76c, 1, 1); | |
DateTime now = DateTime.Now; | |
TimeSpan span = new TimeSpan(now.Ticks - time.Ticks); | |
TimeSpan timeOfDay = now.TimeOfDay; |
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
(ns peeranoia.core | |
(:use [compojure.core :only [defroutes GET]] | |
[hiccup.core :only [escape-html html]] | |
[hiccup.page-helpers :only [include-css include-js html5]] | |
[ring.adapter.jetty :only [run-jetty]] | |
[ring.middleware.cookies :only [wrap-cookies]]) | |
(:require [compojure.route :as route] | |
[compojure.handler :as handler])) | |
(defn- render-page |
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
(ns pmn.views.main | |
(:use [noir.core :only [defpartial defpage]] | |
[hiccup.page-helpers :only [link-to]]) | |
(:require [pmn.views.common :as common])) | |
(def links | |
[{:description "email: " :url"mailto:paul@pmn.org" :title "paul@pmn.org"} | |
{:description "twitter: " :url "http://twitter.com/icey" :title "@icey"} | |
{:description "readlater feed: " :url "http://twitter.com/pmn_" :title "@pmn_"}]) |
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
lein run | |
Starting server... | |
WARNING: Use of undeclared Var cljs.core/defn at line 15 | |
WARNING: Use of undeclared Var cljs.core/truth_ at line 15 | |
WARNING: Use of undeclared Var cljs.core/x at line 15 | |
WARNING: Use of undeclared Var cljs.core/x at line 18 | |
WARNING: Use of undeclared Var cljs.core/x at line 18 | |
WARNING: Use of undeclared Var cljs.core/defn at line 20 | |
WARNING: Use of undeclared Var cljs.core/type_satisfies_ at line 20 | |
WARNING: Use of undeclared Var cljs.core/p at line 20 |
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
(ns pmn.server | |
(:require [noir.server :as server])) | |
(server/load-views "src/pmn/views/") | |
(defn -main [& m] | |
(let [mode (keyword (or (first m) :dev)) | |
port (Integer. (get (System/getenv) "PORT" "8080"))] | |
(server/start port {:mode mode | |
:ns 'pmn}))) |
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
(dissoc (assoc user :password (crypt/encrypt (:password user))) :confirmpass) |
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
java.lang.RuntimeException: Unreadable form | |
at clojure.lang.Util.runtimeException(Util.java:156) | |
at clojure.lang.LispReader$UnreadableReader.invoke(LispReader.java:1094) | |
at clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:618) | |
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126) | |
at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1069) | |
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126) | |
at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1069) | |
at clojure.lang.LispReader.read(LispReader.java:180) | |
at clojure.lang.RT.readString(RT.java:1681) |
OlderNewer