##Chef file create/delete:- 1.
file 'motd' do
content 'something'
end
- chef-apply filename.rb
function doSecond(){ | |
console.log("Second script fired.."); | |
} |
(function(){ | |
$.getScript("https://gist.githubusercontent.com/sinkingshriek/9824555/raw/729b13b28d2a87636a81553f525d63fde7e6f073/second.js", function(){ | |
console.log("First.js has called second.js.."); | |
}); | |
}()); |
<snippet> | |
<content><![CDATA[ | |
/** | |
* ${1:Description} | |
* ${2:@method} ${3:methodName} ${4} | |
* ${5:@param} {${6:paramType}} ${7} | |
* ${8:@return} {${9:returnType}} | |
*/ | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> |
// While you can edit this file, it's best to put your changes in | |
// "User/Preferences.sublime-settings", which overrides the settings in here. | |
// | |
// Settings may also be placed in file type specific options files, for | |
// example, in Packages/Python/Python.sublime-settings for python files. | |
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overriden in the platform |
##Chef file create/delete:- 1.
file 'motd' do
content 'something'
end
function Test(){ | |
this.x = "I'm x"; | |
this.publicFn = function(){ | |
console.log("I'm a instance method"); | |
} | |
} | |
Test.prototype = { | |
protoFn : function(){ | |
console.log("And I'm a proto function"); |
var someVal = "I'm just random value"; | |
global.someVal = someVal; |
var chai = require("chai"); | |
global.assert = chai.assert; | |
global.expect = chai.expect; | |
global.should = chai.should(); |
<snippet> | |
<content><![CDATA[ | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>${1:MySite}</title> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mocha/1.21.4/mocha.css"> | |
</head> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>MySite</title> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mocha/1.21.4/mocha.css"> | |
</head> | |
<body> | |
<div id="mocha"></div> |