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
module Test | |
import Provider | |
import Database | |
import Queries | |
%language TypeProviders | |
%link C "sqlite3api.o" |
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
This is a preview of Tom Ellis' database query library for Haskell. | |
> {-# LANGUAGE Arrows, FlexibleContexts #-} | |
> -- TODO: Get rid of FlexibleContexts if we ever move the definition of s | |
> -- elsewhere. | |
> {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} | |
> {-# LANGUAGE TemplateHaskell #-} | |
> | |
> module Karamaan.Opaleye.Examples where | |
> |
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
http://www.jerf.org/iri/post/2908 | |
http://mwotton.github.com/hs_gbu/ | |
http://reddit.com/r/haskell/comments/y6i7d/do_we_have_real_world_examples_of_where_static/ | |
http://reddit.com/r/haskell/comments/12e3a0/the_good_the_bad_and_the_ugly_haskell_in/ | |
http://blog.codersbase.com/2010/09/composability-laziness-testing-and.html | |
https://www.fpcomplete.com/user/imalsogreg/functional-programming-elevator-pitch | |
http://evincarofautumn.blogspot.com/2012/07/so-i-write-compilers-for-living-now.html | |
http://www.reddit.com/r/haskell/comments/2gz7s1/please_point_me_at_an_eloquent_paper_or_post_on/ |
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
raph = Raphael([..]); | |
chart = raph.g.linechart([..]); | |
var labels = ["first variable", "second variable", "third variable"]; | |
chart.labels = raph.set(); | |
var x = 15; var h = 5; | |
for( var i = 0; i < labels.length; ++i ) { | |
var clr = chart.lines[i].attr("stroke"); | |
chart.labels.push(raph.set()); | |
chart.labels[i].push(raph.g["disc"](x + 5, h, 5) |
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
module System.Hdfs where | |
import Data.ByteString (ByteString) | |
import qualified Data.ByteString as B | |
import Data.Int | |
import Data.Vector (Vector) | |
import Data.Word | |
import Foreign.Ptr | |
type Size = Int32 |
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 org.eclipse.jetty.websocket.WebSocket; | |
import org.eclipse.jetty.websocket.WebSocketServlet; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.util.*; |
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
"copy file" in { | |
var i = 0 | |
val fileGenerator = Enumerator.fromCallback( () => | |
if(i<1000){ i+=1; Future.successful(Some((new java.util.Date).getTime.toString + "\n")) } else Future(None) | |
) | |
val f = FileChannel("/tmp/testwrite.txt").delete.writing.create | |
val f2 = FileChannel("/tmp/testwrite2.txt").delete.writing.create | |
fileGenerator // generates data |
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
vagrant box add smartos http://cuddletech.com/tmp/smartos-latest.box | |
mkdir smartos && cd smartos | |
vagrant init smartos | |
vagrant up | |
vagrant ssh |
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
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/ | |
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date. | |
########################################################## | |
Installing and Configuring SmartOS on Hetzner (with a /29) | |
########################################################## | |
# if you find this gist useful, please star it | |
# thanks to: jamesog, linuxprofessor, ryancnelson for help with routing |
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
# assuming you have Joyent Compute Service available | |
sdc-createmachine --dataset 17c98640-1fdb-11e3-bf51-3708ce78e75a --package g3-standard-1-smartos --name alain-demo-$(uuid) | json -a id |
OlderNewer