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
// FUN METHOD | |
/** | |
* Remove duplicates from an array of objects in javascript | |
* @param arr - Array of objects | |
* @param prop - Property of each object to compare | |
* @returns {Array} | |
*/ | |
function removeDuplicates( arr, prop ) { | |
let obj = {}; | |
return Object.keys(arr.reduce((prev, next) => { |
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
@echo off | |
setlocal | |
call :setESC | |
cls | |
echo %ESC%[101;93m STYLES %ESC%[0m | |
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m | |
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m | |
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m |
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
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
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
@-webkit-keyframes rainbow { | |
0% {border-color: hsl(0, 100%, 50%);} | |
100% {border-color: hsl(255, 100%, 50%);} | |
} | |
.rainbow_border{ | |
border: 4px solid hsl(0, 100%, 50%); | |
-webkit-animation: rainbow 5s infinite alternate; | |
} |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |