Skip to content

Instantly share code, notes, and snippets.

View mattgu74's full-sized avatar

Matthieu Guffroy mattgu74

  • Weezevent
  • Paris, FRANCE
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mattgu74 on github.
  • I am mguffroy (https://keybase.io/mguffroy) on keybase.
  • I have a public key ASALXdIKYHBR_0l559B9Uy5AF62rAEqAQDLkyZ4SkRYIkAo

To claim this, I am signing this object:

@mattgu74
mattgu74 / json.opa
Created November 10, 2011 12:36
test json opa
/*
Test Json in opa
@author Matthieu Guffroy
*/
int_json : RPC.Json.json = {Int = 2}
float_json : RPC.Json.json = {Float = 2.0}
string_json : RPC.Json.json = {String = "test"}
bool_json : RPC.Json.json = {Bool = true}
@mattgu74
mattgu74 / test_simple_table.opa
Created July 13, 2011 13:21
Try to understand how SimpleTable work, with the creation of an example...
/*
* MAIN
*
*/
import stdlib.components.simpletable
import stdlib.widgets.core
import stdlib.interactions
//initial rows
@mattgu74
mattgu74 / main.opa
Created July 4, 2011 13:44
Try to parse domain and subdomain before the url
urlsinit(req : http_request) : Parser.general_parser(resource) =
parser
| {Rule.debug_parse_string(s -> Log.notice("URL",s))} Rule.fail -> error("")
| "/test" -> Resource.page("test", <>The domain is : {HttpRequest.Generic.get_host(req)?"none"}<br/>The url is "/test"</>)
| url=(.*) -> render_page(Text.to_string(url))
urls : Parser.general_parser(http_request -> resource) =
parser
| {Rule.debug_parse_string(s -> Log.notice("URL",s))} Rule.fail -> error("")
| .* -> req ->
@mattgu74
mattgu74 / .gitignore
Created June 5, 2011 21:20
OPA .gitignore
# Personnaly, i prefer the .gitignore not in the git repository
# then I put my .gitignore file for opa project here
# then I will be able to copy/paste when I would need it
.gitignore
*~
opa-debug
*.opp
*.opx
*.exe