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
// arrayToPlain.js v1 | |
function arrayToPlain(array_, columns = 2, heading){ | |
// clone array | |
array__ = array_.join('!@#$%$#@!').split('!@#$%$#@!'); | |
if(heading){ | |
array__ = [...heading, ...array__]; | |
}; | |
let csv = []; | |
let column = 0; | |
let tempArray = []; |
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
// sort-obj-by.js v1 | |
function sortObjBy(array, property) { | |
return array.sort(function(a, b) { | |
return a[property] > b[property] ? 1 : -1 | |
}); | |
}; | |
Object.prototype.sortObjBy = function(property) { | |
return sortObjBy(this, property); | |
}; |
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
// getFullPath.js v1.0.4 | |
function getFullPath($element) { // jquery | |
if (typeof $element.jquery == 'undefined') { | |
$element = $($element); | |
}; | |
let path = []; | |
// pause if $element is HTML | |
let thisIsHtml = false; | |
while (thisIsHtml == false) { | |
let tagName = $element.prop('tagName').toLowerCase(); |
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
// array-alias.js v1 | |
Array.prototype.add = function(){ | |
return this.push(...arguments); | |
}; | |
Array.prototype.add = Array.prototype.add; // alias | |
Array.prototype.addPrev = function(){ | |
return this.unshift(...arguments); | |
}; | |
Array.prototype.removeLast = function(quantity = 1){ | |
console.log(quantity); |
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
// https://www.cloudwards.net/comparison/ | |
$('.row.justify-content-center.cws_com__row').find('a').each(function(){ | |
if( $(this).find('.img-fluid').length == 0 ){ | |
$(this).addClass('title__'); | |
} | |
}); | |
all = []; | |
all2 = []; | |
index = -1; |
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
// plyr-in-chrome.js v1.4 | |
if(isLocalFile() | isLocalIp()){ | |
const $ = (selector, scope = document) => { | |
return scope.querySelector(selector); | |
}; | |
const createElement = (element) => { | |
return document.createElement(element); | |
}; |
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
// array-better-names.js v1 | |
Array.prototype.removeFirst = function(){ | |
let this_ = this; | |
return this_.shift(); | |
}; | |
Array.prototype.removeLast = function(){ | |
let this_ = this; | |
return this_.pop(); | |
}; | |
Array.prototype.addInFirst = function(value){ |
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
gulp-infos.txt | |
__dirname; | |
process.cwd(); | |
gulpfile-fs.txt | |
const fs = require('fs'); | |
fs.readdirSync('.'); // [package.json, gulpfile.js, ...] |
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
filegator\configuration.php | |
'adapter' => function () { | |
return new \League\Flysystem\Adapter\Local( | |
__DIR__.'/repository' | |
vira | |
'adapter' => function () { | |
return new \League\Flysystem\Adapter\Local( |