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
for F in $(ldd Demo/chipmunk_demos| awk '{ print $1 }'); do readelf -Ws /usr/lib/$F | grep gluUnProject; if [ $? -eq 0 ]; then echo $F; fi; done |
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
node-waf clean build -v 2>&1 | grep runner | head -n 1 | cut -d ' ' -f 6- | python -c "import sys; print(' '.join([x.strip('\'') for x in sys.stdin.readline().split(', ')]).replace('[\'','').replace(']\'', ''))" |
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=hello | |
LIBS= | |
INCLUDES= | |
CCX_FLAGS=-g -fPIC -DPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include/ -I/usr/include/node $(INCLUDES) | |
LINK_FLAGS=-shared -L/usr/lib $(LIBS) | |
all: $(MODULE).node |
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
var express = require("express"), | |
server = express.createServer(), | |
fn_sharedmem = require("../lib/fn_sharedmem"), | |
_ = require("underscore"), | |
jade = require("jade"); | |
server.use(express.bodyParser()); | |
server.use(express.cookieParser()); | |
server.get("/", function (req, res) { |
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
var _ = require("underscore"); | |
var f = function () { | |
console.log(JSON.stringify(_.toArray(arguments))); | |
} | |
f.apply(null, [1,2,3]); | |
var h =Function.prototype.bind.apply(f, [null, 1,2,3]) |
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
200 | |
Server: Alcatel-Lucent OSP 2.4 | |
Content-Type: text/xml; charset=utf-8 | |
Content-Length: 18266 | |
Connection: close | |
Set-Cookie: OSP_Ref=0000000517800056;Domain=10.100.75.12:8088;Path=/pfmaccess | |
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:osp="urn:OSP_methods"> | |
<SOAP-ENV:Body> |
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
public void testHeaders() throws Exception { | |
router.on("/testHeaders").put(new F<Request, Response> () { | |
@Override | |
public Response f(Request a) { | |
System.out.println(a.headers.keySet()); | |
Assert.assertEquals("application/json; charset=UTF8", a.headers.get("Content-Type")); | |
Assert.assertEquals("MyUserAgent", a.headers.get("User-Agent")); | |
Assert.assertTrue("Check authentication is http basic auth", a.headers.get("Authorization").contains("Basic ")); | |
return Response.custom(200, Maps.<String,String>newHashMap(), "<html>Custom response content</html>"); |
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
zypper ar http://download.opensuse.org/distribution/11.3/repo/oss/ oss | |
zypper ar http://download.opensuse.org/distribution/11.3/repo/non-oss/ non-oss | |
zypper refresh --services |
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
var _ = require("underscore"), | |
assert = require("assert"); | |
describe("Djikstra", function () { | |
var links = [ | |
{from:"1",to:"2",cost:7}, | |
{from:"2",to:"1",cost:7}, | |
{from:"2",to:"3",cost:15}, | |
{from:"3",to:"2",cost:15}, |
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
var f = function (l) { | |
var paired = [], | |
previous = 0; | |
for (var i = 1; i < l.length; i++) { | |
paired.push([l[previous], l[i]]); | |
previous++; | |
} | |
paired.push([previous,0]); |