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
/* sidebar */ | |
.nav-header { | |
border: none !important; | |
} | |
.fa-caret-down { | |
font-size: .6rem !important; | |
line-height: 2.5 !important; | |
} |
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
const defer = () => { | |
const result = {}; | |
result.promise = new Promise((resolve, reject) => { | |
result.resolve = resolve; | |
result.reject = reject; | |
}); | |
return result; | |
} |
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
const collapse = extensions => | |
[...document.querySelectorAll('.file.js-details-container')] | |
.filter(item => extensions.indexOf(item.querySelector('.file-header .file-info .user-select-contain').innerHTML.split('.').pop().toLowerCase().trim()) > -1) | |
.forEach(item => item.querySelector('.data').style.display = 'none'); | |
collapse(['php']); |
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
// Idea is from @addyosmani - https://gist.github.com/addyosmani/fd3999ea7fce242756b1 | |
const css = e => | |
[...$$(e)].forEach(a => a.style.outline='1px solid #'+(~~(Math.random()*(1<<24))).toString(16)); | |
css('*'); |
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
const rgbToHex = (r, g, b) => | |
'#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); | |
rgbToHex(24, 42, 99); // #182a63 |
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
const fac = x => | |
x < 0 ? 1 / 0 : x === 0 ? 1 : x * fac(x - 1); | |
fac(5); // 120 |