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
## readFileSync(filename, [encoding]) | |
* `filename` String, Required. The name of the file to read | |
* `encoding` String, Optional. The encoding to use | |
* Returns: String or Buffer. The contents of the filename. If `encoding` is specified, then this function returns a string. Otherwise it returns a `buffer`. | |
* * * | |
## fs.readFileSync(filename, [encoding='utf8']) -> String | Buffer | |
- filename (String): The name of the file to read | |
- encoding (String): The encoding to use |
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 -e | |
# original here: https://github.com/lennartcl/cloud9-hello-plugin/blob/master/wrap-in-js.sh | |
if [ $# == 0 ]; then | |
echo No files specified | |
exit 1 | |
fi | |
for F in $*; do | |
echo -n '// Wrapped in JavaScript, to avoid cross-origin restrictions, created using wrap-in-js.sh |
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 spawn = require('child_process').spawn; | |
var cmd = spawn( | |
"/Users/gjtorikian/Developer/cloud9/plugins-server/cloud9.ide.search/darwin_x64/ag", | |
["-l", "--search-binary", "--nobreak", "--ackmate", "."]); | |
cmd.stdout.setEncoding('utf8'); | |
cmd.stdout.on('data', function (data) { | |
console.log('stdout: ' + data); | |
}); |
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 extend(o, plus) { | |
var r = {}, | |
i; | |
for (i in o) { | |
if (o.hasOwnProperty(i)) { | |
r[i] = o[i]; | |
} | |
} | |
if (plus) { | |
for (i in plus) { |
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
{ | |
"range": [ | |
49981, | |
49995 | |
], | |
"value": "$(\"head\")[0]", | |
"type": "Line" | |
}, | |
{ | |
"range": [ |
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
{ type: 'Line', value: '$("head")[0]', range: [ 49981, 49995 ] }, | |
{ type: 'Line', | |
value: 'elScript.defer = true;', | |
range: [ 50061, 50085 ] }, | |
{ type: 'Block', | |
value: '*\n * @private\n ', | |
range: [ 50757, 50784 ] }, | |
{ type: 'Line', | |
value: '#ifdef __PARSER_AML', | |
range: [ 52591, 52612 ] }, |
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
//#ifdef __DEBUG | |
if (apf.started) | |
apf.console.info("including js file: " + sourceFile); | |
//#endif | |
var sSrc = doBase ? apf.getAbsolutePath(apf.basePath || "", sourceFile) : sourceFile; | |
var head = document.getElementsByTagName("head")[0],//$("head")[0] | |
elScript = document.createElement("script"); | |
//elScript.defer = true; | |
if (type) |
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
if exp && ext_define?(exp) | |
make_class(to_value(exp["arguments"][0]), exp) | |
# foo = Ext.extend("Parent", {}) | |
elsif exp && assignment?(exp) && ext_extend?(exp["right"]) | |
make_class(to_s(exp["left"]), exp["right"]) | |
# Foo = ... | |
elsif exp && assignment?(exp) && class_name?(to_s(exp["left"])) |
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 fs = require("fs"), | |
async = require("async"); | |
var q = async.queue(function (task, callback) { | |
if (task.type == "file") | |
fs.readFile(task.path, "utf8", callback); | |
}, 250); | |
dirFiles.forEach(function(path) { | |
q.push({type: "file", path: path}, function (err, fileString) { |
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
dock.addDockable({ | |
expanded : -1, | |
width : 300, | |
sections : [ | |
{ | |
width : 260, | |
height: 350, | |
buttons : [ | |
{ | |
caption: "My Dock Button", |
OlderNewer