This file has been truncated, but you can view the full file.
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 webpackUniversalModuleDefinition(root, factory) { | |
| if(typeof exports === 'object' && typeof module === 'object') | |
| module.exports = factory(); | |
| else if(typeof define === 'function' && define.amd) | |
| define([], factory); | |
| else if(typeof exports === 'object') | |
| exports["Webamp"] = factory(); | |
| else | |
| root["Webamp"] = factory(); | |
| })(window, function() { |
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 carregaJS(u, c) { | |
| var d = document, t = 'script', | |
| o = d.createElement(t), | |
| s = d.getElementsByTagName(t)[0]; | |
| o.src = u; | |
| if (c) { o.addEventListener('load', function (e) { c(); }, false)} | |
| s.parentNode.insertBefore(o, s); | |
| } |
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
| #!/bin/bash | |
| init() { | |
| killall -q polybar | |
| while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done | |
| polybar sensual | |
| echo "Polybar relançada..." |
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.prototype.min = function() { | |
| var self = this, p = arguments[0]; | |
| return self | |
| .filter(f => p.zero === false ? f[p.prop] > 0 : f) | |
| .map(m => m[p.prop]) | |
| .reduce((a, c) => { | |
| return a = (a === undefined || c < a) ? c : a | |
| }); | |
| } |
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.prototype.copy = function() { | |
| return this.map(function(e){return {...e}}); | |
| } |
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.prototype.groupBy = function() { | |
| var self = this, p = arguments[0]; | |
| return self.map(m => m[p.prop]) | |
| .reduce((a, d) => {if (!a.includes(d)) { a.push(d); } return a;}, []) | |
| .map(m => self | |
| .filter(f => f[p.prop] === m)); | |
| } |
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
| fetch(url) | |
| .then((resp) => resp.json()) | |
| .then(function(data) { | |
| console.log(data); | |
| }); | |
| // se por acaso o CORS reclama | |
| fetch(url,{ | |
| mode: 'no-cors' | |
| }) |
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(function(a, b) { | |
| return a.categoria.toString().localeCompare(b.categoria.toString()); | |
| }) |
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
| items.filter(function(reg, i) { | |
| reg.index = i; | |
| return Object.values(reg).find(function(prop) { | |
| return prop !== null && prop.toString().normalize('NFD').replace(/[\u0300-\u036f]/g, "").toUpperCase().indexOf(query.toUpperCase()) >= 0; | |
| }) !== undefined; | |
| }).map(function(reg) {return reg.index}); |
NewerOlder