This file contains hidden or 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
/** | |
* Wanna FAFO what a jawn is? Use this function! | |
* @param {*} jawn The jawn. Any jawn. | |
* @returns {string} What the jawn is... | |
*/ | |
function whatIsThisJawn(jawn) { | |
let answer = 'Yo this jawn is'; | |
if (jawn === undefined || jawn === null) { | |
return `${answer} ${jawn}`; |
This file contains hidden or 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
([[1 == []][0] + []][0][1]) + ([[0 == []][0] + []][0][1]) + ([[0 == []][0] + []][0][0]) + ([[] + [][0]][0][4]) + ([[] + [][0]][0][0]) + ([[1 == []][0] + []][0][2]) |
This file contains hidden or 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 say(phrase) { | |
speechSynthesis.speak(new SpeechSynthesisUtterance(phrase)); | |
} | |
// Ex. | |
say('Happy Friday :)'); |
This file contains hidden or 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 NUM_COUNT = 1000; | |
var _nums; | |
function _everyFiveWaitASecond() { | |
var chunk = function(i, results) { | |
results = results || []; | |
console.log('chunk(', i, ')'); | |
if (!_nums.length) { |
This file contains hidden or 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
class Node { | |
constructor(value, next) { | |
this.value = value; | |
this.next = next; | |
} | |
} | |
class LinkedList { | |
constructor() { | |
this.head = null; |
This file contains hidden or 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 eq(a, b) { | |
return new Promise(function(resolve, reject) { | |
a === b ? | |
resolve(`${ a } === ${ b }`) : | |
reject(`${ a } !== ${ b }`); | |
}); | |
} | |
function eqs(a, b) { | |
return new Promise(function(resolve, reject) { |
This file contains hidden or 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
/** | |
* Creates and returns a 2D array range from the source array | |
* @param {Array} array - The source array | |
* @param {number} y - The y position from which to start the range | |
* @param {number} x - The x position from which to start the range | |
* @param {number} h - The height of the range | |
* @param {number} w - The width of the range | |
* @returns {Array} The selected range | |
*/ |
This file contains hidden or 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
echo '' | |
echo "Hello $(whoami)!" | |
echo '' | |
# ------------------------------------ | |
# Directory Shortcuts | |
# ------------------------------------ | |
alias back='cd $OLDPWD' | |
alias up='cd ..' |
This file contains hidden or 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
{ | |
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | |
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | |
// Placeholders with the same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "scope": "javascript,typescript", |
This file contains hidden or 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 * chunkGen(collection, size=2, i=0) { | |
for (; i < collection.length; i += size) { | |
yield collection.slice(i, i + size); | |
} | |
} | |
function chunk(collection, size=1) { | |
const chunked = []; | |
const gen = chunkGen(collection, size); | |
let c = gen.next(); |
NewerOlder