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
| <!doctype html> | |
| <html> | |
| <body> | |
| <header role="banner"> | |
| <a href="/" rel="home">My company</a> | |
| <nav role="navigation"> | |
| <a href="/about">About</a> | |
| <a href="/contact">Contact</a> | |
| </nav> | |
| </header> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
| <title>One Graph</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
| <script type="text/javascript" src="simple-graph.js"></script> | |
| <style type="text/css"> | |
| body { font: 13px sans-serif; } | |
| rect { fill: #fff; } |
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
| $(function(){ | |
| //=========================================================== | |
| // JavaScript object 'namespace' extension experiments | |
| // by @addyosmani (comparing deep extension in vanilla JS vs. | |
| // jQuery's $.extend) | |
| // | |
| // | |
| // The goal here is to: | |
| // |
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
| (* F# Twitter API ServiceStack ASP.NET Web Service on Windows/Mono/OSX | |
| Instructions: | |
| 1) download https://github.com/ServiceStack/ServiceStack/downloads | |
| 2) fsharpc -r:ServiceStack.Common.dll -r:ServiceStack.Interfaces.dll -r:ServiceStack.Text.dll -r:ServiceStack.dll --target:library FTweetStackAsp.fs | |
| 3) mkdir bin && cp *.dll bin | |
| 4) echo "<%@ Application Inherits=\"FTweetStack.Global\" %>" >> Global.asax | |
| 5) copy Web.config mappings from http://www.servicestack.net/ServiceStack.Hello/ | |
| 6) xsp4 | |
| *) |
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
| #!/usr/bin/env lein-exec | |
| (println (group-by (fn [e] (if e true false)) [true, false, -1, 0, 1, 2, nil, (new Object), [], #{}, '(), [(new Object)], {}, {:foo, (new Object)}])) | |
| ;;{true [true -1 0 1 2 #<Object java.lang.Object@4d8ce14a> [] #{} () [#<Object java.lang.Object@48ff4cf>] {} {:foo #<Object java.lang.Object@7114460>}], false [false nil]} |
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 main | |
| import ( | |
| "bytes" | |
| "encoding/hex" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" |
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 scalaz.example | |
| object Reader extends App { | |
| /** | |
| * Manual propagation of the environment (in the example, `contextRoot`.) | |
| */ | |
| object Config0 { | |
| def fragment1(contextRoot: String) = <a href={contextRoot + "/foo"}>foo</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
| Originally: | |
| https://gist.github.com/7565976a89d5da1511ce | |
| Hi Donald (and Martin), | |
| Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
| appreciate the tone. This is a Yegge-long response, but given that you and | |
| Martin are the two people best-situated to do anything about this, I'd rather | |
| err on the side of giving you too much to think about. I realize I'm being very | |
| critical of something in which you've invested a great deal (both financially |
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
| innerWidth / innerHeight tests @ http://sandbox.thewikies.com/orientation/ | |
| -------------------------------------------------------------------------------- | |
| Tested (14 devices, 28 browsers): | |
| Droid 2 Global Android 2.2 | |
| iPhone 4 iOS5 (Safari, Opera Mini) | |
| Motorola Atrix Android 2.3.4 (Stock browser, Dolphin, Skyfire, Opera Mini, Firefox) | |
| Samsung Galaxy S9000 Android 2.3 (Webkit, Opera Mobile) | |
| Samsung Galaxy Y Android 2.3.5 |