Add the styles to the .atom/styles.less
stylesheet in Atom.
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
// ==UserScript== | |
// @name Github - package.json/bower.json dependency linker | |
// @version 0.0.2 | |
// @namespace http://spiralx.org/github-npm-autolink | |
// @author James Skinner <spiralx@gmail.com> http://userscripts.org/users/55684 | |
// @description When viewing a package.json file, automatically links dependencies to their NPM page | |
// @include https://github.com/*/package.json | |
// @include https://github.com/*/bower.json | |
// @run-at document-end | |
// @grant unsafeWindow GM_xmlhttpRequest |
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(){return 2*3;}).toString() === (function(){return 6;}).toString(); // true in FF & Opera, false in IE & WebKit |
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(){return 2*3;}).toString() === (function(){return 6;}).toString(); // true in FF & Opera, false in IE & WebKit, because Opera don't put the actual code of the function on the string and FF optimizes the source to be the same. |
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
/** | |
* IE 10 + supports ClassList, but the standards are vague. It is extremely | |
* convenient to add several classnames at once, FF and Chrome support that. | |
* | |
* @author Alexander Milevski <info@w8r.name> | |
* | |
* https://gist.github.com/w8r/fbdbfea078629ff913d4 | |
* | |
* MIT License | |
* |
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
myFunction( param ) { | |
var emulated = window.tinyHippos != undefined; | |
if ( emulated ){ | |
//do something specific to emulated environment; | |
return; | |
} | |
///do something else... |
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
using System.Json; | |
... | |
var response = "{ \"foo\": \"bar\" }"; | |
var jsonValue = JsonValue.Parse (response) as JsonObject; | |
// Split the lambda declaration and initialization | |
// so that we can do recursion; | |
Func<JsonValue, NSDictionary> toNSDictionary; | |
toNSDictionary = (obj)=> { |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace UA | |
{ | |
public static class UserAgent |
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
_.mixin({ | |
// ### _.objMap | |
// _.map for objects, keeps key/value associations | |
objMap: function (input, mapper, context) { | |
return _.reduce(input, function (obj, v, k) { | |
obj[k] = mapper.call(context, v, k, input); | |
return obj; | |
}, {}, context); | |
}, | |
// ### _.objFilter |
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
/* | |
Ping | |
*/ | |
$.extend($, { | |
Ping: function Ping(url, timeout) { | |
timeout = timeout || 1500; | |
var timer = null; | |
return $.Deferred(function deferred(defer) { |
OlderNewer