Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
set your status

Oleg Gaidarenko markelog

😀
set your status
View GitHub Profile
View gist:4be9520d09a5adaf5420
```sh
$ grunt
Running "concat:dist" (concat) task
File dist/jquery-migrate.js created.
Running "uglify:all" (uglify) task
>> 1 file created.
Running "jshint:dist" (jshint) task
>> 1 file lint free.
View gist:0d1519ea0bd7fc054489
/*!
* jQuery JavaScript Library v3.0.0-pre
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
View json
[
{
"type": "FunctionDeclaration",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
View gist:8d2663f5046aef86a1c4
{
configure: ...
getOptionName: ...
check: ...
format: /* global function for whitespace imported through `require` */
// or
format: /* string option "whitespace" which would signify what kind of manipulation should be done */
// or
format: /* "complicated" format function for hard to do rules */
View gist:752e53faf9f27de4024d
// Deprecate and remove:
/*
* (require | disallow)SpacesInFunctionExpression
* (require | disallow)requireSpacesInFunction
*/
{
options: {
additionalRules: [],
plugins: [],
fileExtensions: [],
@markelog
markelog / gist:bf9059f816d366c552c8
Created Oct 1, 2014
new approach to jscs config
View gist:bf9059f816d366c552c8
{
codeBlocks: {
curlyBraces: {
operators: true || [],
expect: [ "return", "break" ]
},
newlineBefore: {
statements: true,
expect: [ "for..of", "for" ]
View gist:42d43a489afb7201ddd6
// See http://api.jquery.com/jQuery.ajax/#entry-examples
$.xhr( "some.php" )
.method( "POST" )
.send({ name: "John", location: "Boston" })
.then(function( xhr ) {
alert( "Data Saved:" + xhr.responseText );
});
$.xhr( "test.html" )
View gist:762c2584b53cace10fb3
file.iterateTokensByType("type", function() {
file === this // true
});
View gist:625fdec212b938b43738
it('should not require between simple arguments', function() {
assert(checker.checkString('foo(a,b);').getErrorCount() === 2);
assert(checker.checkString('foo( a,b);').getErrorCount() === 1);
assert(checker.checkString('foo( a,b );').isEmpty());
});
it('should not require spaces for empty arguments list', function() {
assert(checker.checkString('foo();').isEmpty());
});
View gist:7407ac01a054cdbf0cc5
$.xhr( "url", {
method: "post",
timeout: 1000,
});
// Same as
$.xhr( "url" ).method( "post" ).timeout( 1000 )
You can’t perform that action at this time.