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'); | |
var getModuleShortName = function(giturlORname) { | |
if (giturlORname.indexOf('git://github.com') > -1) { | |
return giturlORname.split('/').pop().split('#')[0]; | |
} | |
return giturlORname.split('@')[0]; | |
}; | |
var searchModulesCache = function(moduleName, callback) { |
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 npm = require('npm'); | |
var fs = require('fs'); | |
var path = require('path'); | |
module.constructor.new_packageMainCache = {}; // own cache | |
// copied from node src | |
function statPath(path) { | |
try { |
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 isNumber = function(n) { | |
return !isNaN(parseFloat(n)) && isFinite(n); | |
}; | |
var getStorage = function(key) { | |
var data = localStorage.getItem(key), | |
ttl = localStorage.getItem(key + '-ttl'), | |
expired = ttl == null ? false : ttl < (new Date()).getTime(); |
This file has been truncated, but you can view the full file.
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
[nodebb-plugin-import] importer.success Importing 5000 topics. | |
isUserAllowedTo topics:create 1049 [ '2' ] | |
isGuestAllowedTo topics:create [ '2' ] | |
isGuestAllowedTo:result topics:create [ '2' ] result: true | |
privileges.categories.can=topics:create cid=2 uid=2 result=true | |
isUserAllowedTo topics:create 904 [ '2' ] | |
isUserAllowedTo:result topics:create 1049 [ '2' ] result:false | |
privileges.categories.can=topics:create cid=2 uid=2 result=false | |
isGuestAllowedTo topics:create [ '2' ] | |
isUserAllowedTo:result topics:create 904 [ '2' ] result:false |
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
User-agent: * | |
Disallow: / |
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 convert = require('./bbcode-to-markdown'); | |
var testString = '[As always, if anyone, especially ENFPs, has any suggestions for changes or improvements, feel free to comment.]' + | |
'[SIZE="5"]ENFP: A Jungian Cognitive Function Analysis[/SIZE]' + | |
'[SIZE="3"]by simulatedworld[/SIZE]' + | |
'[URL="www.personalitynation.com"]www.personalitynation.com[/URL]' + | |
'[B]ENFP[/B], or [I]Extroverted iNtuitive Feeling Perceiver[/I], is a label borrowed from MBTI nomenclature and now applied to the Jungian Cognitive Function set [B]{Ne, Fi, Te, Si}[/B].' + | |
'[B]Dominant: Extroverted iNtuition (Ne)[/B]' + | |
'[I]"More than anything I need to feel like I\'m working toward some kind of meaningful change or improvement in people\'s lives. I have a lot of big ideas for making things better, and I get really excited about new ideas that point toward some kind of new direction or idea I hadn\'t thought of before. I usually try to have a lot of people I like around, both because I like having them to bounce my ideas |
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
// won't work, im dumb, I just realized that it's a cross-domain frame, initially I thought the frame-content is being written by the js script | |
var gc2r = (function() { | |
var hostPageStyle = '' | |
+ '@media screen and (max-width: 350px) {' | |
+ ' div.goog-bubble-content.gc-reset {' | |
+ ' width: auto !important;' | |
+ ' }' | |
+ ' div.goog-bubble-content.gc-reset, ' |
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
/* | |
example: | |
// [1,2,3,4,5,6,7,8] (must be a power of 2 length) | |
var arr = new Foldable([1, 2, 3, 4, 5, 6, 7, 8]); | |
arr.fold( [ "l", "r", "l" ] ); // left, right, left | |
// 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 augment = function (base, extra, context) { | |
return (function () { | |
return function () { | |
base.apply(context || this, arguments); | |
extra.apply(context || this, arguments); | |
}; | |
})(); | |
}; | |
// usage |
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
augment = (base, extra, context) -> | |
(-> | |
-> | |
base.apply context or this, arguments_ | |
extra.apply context or this, arguments_ | |
)() |
OlderNewer