Skip to content

Instantly share code, notes, and snippets.

View shri3k's full-sized avatar
🤖
automate all things

Yojan Shrestha shri3k

🤖
automate all things
  • Austin
View GitHub Profile
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..");
});
}());
@shri3k
shri3k / yuidoc.sublime-snippet
Last active August 29, 2015 14:00
Sublime-snippets
<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 -->
@shri3k
shri3k / Preferences.sublime-settings
Created June 17, 2014 01:01
Sublime2 default settings
// 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
  1. chef-apply filename.rb
@shri3k
shri3k / chains.js
Created August 10, 2014 22:48
Creating chains in js
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");
@shri3k
shri3k / globalMe.js
Created August 16, 2014 16:30
Node-globals
var someVal = "I'm just random value";
global.someVal = someVal;
@shri3k
shri3k / chai-mocha.js
Created August 16, 2014 16:49
chai wrapper for mocha
var chai = require("chai");
global.assert = chai.assert;
global.expect = chai.expect;
global.should = chai.should();
@shri3k
shri3k / mocha-chai-ng-assert.sublime-snippet
Created August 27, 2014 01:53
Boilerplate for angularjs, mocha and chai with assert assertion.
<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>
@shri3k
shri3k / test.index.html
Last active August 29, 2015 14:05
Angular, mocha, chai barebone test skeleton.
<!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>