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
# emulates "nrmwyoldrmtob".scan(/.{1,5}/) | |
# encodes 5 char words and then some | |
class A | |
@replace = (str)-> | |
str.match(/[a-z|0-9]{5}|[\w]+/ig).join(" ") | |
test= A.replace("nrmwyoldrmtob") |
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
// The code creates a new jsdom window | |
// and adds jQuery to the document via a script element. | |
// Although it is just an illustrative | |
// example it is easy to modify it to work with | |
// real pages retrieved from the Internet. | |
var jsdom = require('jsdom'); | |
jsdom.env({ | |
html: "<html><body></body></html>", |
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 svg = d3.select("svg"); | |
svg.se |
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
p5.keyPressed = function() { | |
if(p5.keyCode == p5.BACKSPACE ){ | |
console.log("backspace was pressed"); | |
}else if(p5.keypressed){ | |
if(p5.key == 'c'){ | |
console.log("c was pressed"); | |
} | |
} | |
} |
NewerOlder