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
pcm.!default { | |
type pulse | |
} | |
ctl.!default { | |
type pulse | |
} |
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 ( | |
"net/http" | |
"io" | |
"code.google.com/p/go.net/websocket" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |
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
#!/bin/bash | |
server=$1 | |
if [ -z "$server" ]; then | |
echo "USAGE: ${0##*/} server" | |
exit 1 | |
fi | |
while read first rest; do | |
for second in $rest; do |
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
(ns proxy-test.core) | |
(defn make-foo [] | |
(proxy [Runnable] [] | |
(run [] | |
(println "foo" (class this))))) | |
(defn make-bar [] | |
(proxy [Runnable] [] | |
(run [] |
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 setAttrs(obj, attrs) { | |
_.each(attrs, function(value, attr) { | |
obj.setAttribute(attr, value); | |
}); | |
}; | |
var paper = document.getElementById("js-svg"); | |
var svgns = "http://www.w3.org/2000/svg"; | |
var svg = paper.appendChild(document.createElementNS(svgns,"svg")); | |
var rect = svg.appendChild(document.createElementNS(svgns,"rect")); |
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
<svg class="paper" xmlns="http://www.w3.org/2000/svg" | |
version="1.1" width="785" height="200"> | |
<rect x="50" y="50" width="300" height="100" r="0" | |
rx="0" ry="0" fill="cyan" stroke="black" | |
stroke-width="5px"/> | |
<ellipse cx="600" cy="100" rx="150" ry="50" | |
fill="orange" stroke="black" | |
stroke-width="5px"/> | |
</svg> |
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
var paper = Raphael("gradients", 785, 200); | |
var circle = paper.circle(130, 100, 75); | |
// Simple 90 degree gradient from white to black | |
circle.attr("fill", "90-#fff-#000"); | |
// 0 degree gradient from white to black, via red at 20% | |
circle.clone().translate(175).attr("fill", "0-#fff-#f00:20-#000"); | |
// Radial gradient from white to black | |
circle.clone().translate(350).attr("fill", "r#fff-#000"); | |
// Radiel gradient from white to black at focus point (0.25, 0.75) | |
circle.clone().translate(525).attr("fill", "r(0.25, 0.75)#fff-#000"); |
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
var paper = Raphael("animation", 785, 200); | |
var left, right, circle = paper.circle(30, 100, 20).attr("fill", "black"); | |
right = function() { | |
circle.animate({cx: 700, r: 80, fill: "red"}, 3000, "bounce"); | |
circle.node.onclick = left; | |
}; | |
left = function() { | |
circle.animate({cx: 30, r: 10, fill: "black"}, 3000, "bounce"); | |
circle.node.onclick = right; | |
} |
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
var paper = Raphael("path-curves", 785, 200); | |
var path = "M 100 100" | |
+ "C 120 10 180 10 200 100" | |
+ "S 280 190 300 100" | |
+ "S 380 10 400 100" | |
+ "S 480 190 500 100" | |
+ "S 580 10 600 100" | |
+ "S 680 190 700 100"; | |
paper.path(path); |
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
var paper = Raphael("text", 785, 200); | |
var attr = { | |
fill: "purple", | |
font: "80px Helvetica, Arial", | |
"text-anchor": "start" | |
}; | |
paper.text(35, 120, "SVG is great for text!").attr(attr); |
NewerOlder