Date: Monday Dec. 9, 2013
- Add repositories holding newer versions of g++ and qt.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
sudo apt-add-repository ppa:ubuntu-sdk-team/ppa &&
sudo aptitude update &&
sudo aptitude safe-upgrade
foo = let | |
zip = ha daoe haotu xaoeud | |
zap = hao ado uaoehu aoeuh | |
in do | |
bar daoeu daoeu daogeu aidoef odxkbam xaoe uiadoe ubamoeu xaoeu aoifu | |
baz aoedui a udhaod uao ui6af oudhao uiaoeu6 aogud aoeuia uaobaoeu | |
whatever aoed a, dgu haoe udaog uba,u daoefu aoueghaoeu aoduaou i | |
where |
#!/bin/bash | |
set -e | |
read -p "Package name: " package | |
read -p "Version: " version | |
read -p "Hackage user: " user | |
read -sp "Hackage password (not echoed): " password | |
echo "== BUILDING WITH DOCS" |
Date: Monday Dec. 9, 2013
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
sudo apt-add-repository ppa:ubuntu-sdk-team/ppa &&
sudo aptitude update &&
sudo aptitude safe-upgrade
Here's what I'm using to generically build a controller out of a Fay module.
# CoffeeScript
angModule = angular.module("angModule", [])
angModule.controller("FooCtl", ($scope) ->
$scope[k] = v for own k, v of Strict.HaskModule
)
{-# LANGUAGE EmptyDataDecls #-} | |
-- This is a literate file, for some value of 'literate'. | |
-- | |
-- Read the comments. Read the code. Enjoy. :) | |
import Prelude | |
import FFI | |
-- | Meme-appropriate starting point. We use javascript to make fay which |
{-# LANGUAGE TemplateHaskell #-} | |
-- An example of testing TH-generated thingadoohickies. | |
-- | |
-- Using the standard QuickCheck module, there is no direct way to test | |
-- values generated with Template Haskell functions, most of which end up | |
-- in the Q monad. This little writeup describes how to test those values | |
-- using the module Test.QuickCheck.Monadic. | |
-- | |
-- For this example, you can ignore the doohickies being generated. I just |
filter('fooLink', function () { | |
return function(g, curId) { | |
if (g.id === curId) { | |
return g.name; | |
} else { | |
return '<a href="/foo/' + g.id + '">' + g.name + '</a>'; | |
} | |
}}); |
diff --git a/Foundation.hs b/Foundation.hs | |
index f054558..ef71bd9 100644 | |
--- a/Foundation.hs | |
+++ b/Foundation.hs | |
@@ -22,6 +22,7 @@ import Yesod.Auth.GoogleEmail | |
import Yesod.Default.Config | |
import Yesod.Default.Util (addStaticContentExternal) | |
import Yesod.Logger (Logger, logMsg, formatLogText) | |
+import Yesod.Form.Nic | |
import Network.HTTP.Conduit (Manager) |
YUI.use('*', function(Y) { | |
// <-- pull in PersonModel from auto-generated-models.js! | |
var p = new PersonModel({...}); | |
// etc. | |
}); |