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 path = require('path'); | |
var nconf = require('nconf'); | |
var async = require('async'); | |
nconf.file({ file: path.join(__dirname, './config.json') }); | |
var db = require('./src/database'); | |
var S3_BASE_URL = 'https://nodebb-assests.s3-us-west-2.amazonaws.com/'; |
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
// this file is assumed to be in the root NodeBB directory | |
var continuationLocalStorage = require('continuation-local-storage'); | |
var cls = continuationLocalStorage.createNamespace('test'); | |
var async = require('async'); | |
var path = require('path'); | |
var nconf = require('nconf'); |
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 asyncHook = require('async-hook'); | |
var path = require('path'); | |
var utils = require('../../public/src/utils'); | |
function CLS() { | |
var mem = {}; | |
var self = this; | |
this.storage = null; |
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
/* | |
You must require CLS first, | |
In this example if you require request first, it closes over some dep before CLS could rewrite it | |
1. run it as it the first time. | |
2. then uncomment the first request and comment out the one at Line 15, then run it again. | |
*/ | |
// var request = require('request'); |
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
<p><a target=\"_blank\" href=\"www.youtube.com/watch?v=FMTDwAFk0cA\">fluxualte the impending desicion come forth wollow willing to juxtapost the danger days of a carrion fairy next to a unicorn in the back of the shed it is a sado macsohist anomanyus to situate forthcoming streams of desire flavored trees sapping and snorting in rainbow discharge talking like a mouldy yak infecting the demons **♣ lucky charms ♣ ** online profile eat a facebook field svksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksksvksvksvksvksvkssudghawdugh fluxualte the impending desicion come forth wollow willing to juxtapost the danger days of a carrion fairy next to a unicorn in the back of the shed it is a sado macsohist anomanyus to situate forthcoming streams of desire flavored trees sapping and snorting in rainbow discharge talking like a mouldy yak infecting the demons **♣ lucky charms ♣ ** online profile eat a facebook field svksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksvksv |
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
// https://codility.com/programmers/task/odd_occurrences_in_array/ | |
/* | |
A non-empty zero-indexed array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. | |
For example, in array A such that: | |
A[0] = 9 A[1] = 3 A[2] = 9 | |
A[3] = 3 A[4] = 9 A[5] = 7 | |
A[6] = 9 |
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
// https://codility.com/programmers/task/binary_gap/ | |
/* | |
A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. | |
For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of length 3. The number 20 has binary representation 10100 and contains one binary gap of length 1. The number 15 has binary representation 1111 and has no binary gaps. | |
Write a function: | |
int solution(int N); |
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 palindromize(word) { | |
if (Array.isArray(word)) { | |
return word.map(palindromize); | |
}; | |
if (!word) return null; | |
word = "" + word; | |
// single letter words? really? i don't know.. |
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
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 |