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 $; | |
if (typeof jQuery === 'undefined') { | |
if (typeof require === 'function') { | |
try { | |
$ = require('jquery'); | |
} catch (err) {} | |
} | |
} else { | |
$ = jQuery; | |
} |
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 http = require('http') | |
, request = require('hyperquest') | |
var server = http.createServer(function (req, res) { | |
if (req.url === '/respond') { | |
res.end('ok') | |
return server.close() | |
} | |
proxy('http://localhost:11111/respond', req, res) | |
}).listen(11111) |
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 test file! | |
Hello, world! | |
<script>alert('hello');</script> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec hendrerit vitae massa id congue. Cras quis orci fringilla, tempor est ut, cursus lorem. Morbi a diam enim. Pellentesque dignissim lacus velit. Nulla cursus purus eget eleifend eleifend. Maecenas fermentum consequat lacus, in condimentum dolor tincidunt sit amet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. | |
Fusce condimentum, neque nec ornare fermentum, ligula lectus faucibus velit, eget hendrerit ipsum libero vitae ipsum. Donec metus sapien, pretium sit amet aliquam pretium, lobortis ut elit. Fusce fringilla nisi id sem eleifend, non commodo felis gravida. Nunc posuere, arcu eu auctor accumsan, enim tellus venenatis lorem, in vehicula mauris purus id tortor. Nam a lorem metus. Ut faucibus, felis at condimentum interdum, lectus tortor euismod erat, eget pharetra leo urna vulputate turpis. Curabitur nec nunc eget ligula consequat eleifend |
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
/** | |
* @fileOverview IndexedDB data provider for viewer.js | |
* @author lakenen | |
*/ | |
/* | |
// Usage example: | |
var viewer = Crocodoc.createViewer('.viewer', { | |
url: 'https://viewer.js/assets', | |
dataProviders: { |
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
/** | |
* @fileoverview layout-presentation-vertical component definition | |
* @author lakenen | |
*/ | |
(function () { | |
var componentName = 'layout-presentation-vertical'; | |
var mixins = [ | |
'layout-' + Crocodoc.LAYOUT_PRESENTATION, | |
'layout-' + Crocodoc.LAYOUT_VERTICAL |
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
/** | |
* @fileoverview layout-vertical-two-page component definition | |
* @author lakenen | |
*/ | |
/** | |
* The vertical-two-page layout | |
*/ | |
Crocodoc.addComponent('layout-vertical-two-page', ['layout-' + Crocodoc.LAYOUT_VERTICAL], function (scope, vertical) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
iframe { | |
margin-top:10000px; | |
} | |
</style> | |
</head> | |
<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
function dkc(fn) { | |
var k1 = 28978765259, | |
k2 = 132455748307, | |
kys = [], | |
chk = function (event) { | |
kys.push(event.keyCode); | |
if (kys.length > 11) { | |
kys.shift(); | |
} | |
if (k1 *k2 === parseInt(kys.join(''), 10)) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="chart"></div> |
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
#!/bin/bash | |
emcc helloworld.cpp -o helloworld.js \ | |
-s EXPORTED_FUNCTIONS="['_HW_constructor','_HW_destructor','_HW_setX','_HW_getX']" | |
cat helloworld-proxy.js >> helloworld.js |