Skip to content

Instantly share code, notes, and snippets.

View AliwerErgashev's full-sized avatar

Alisher Ergashev AliwerErgashev

  • Freelancer
  • Uzbekistan, Tashkent
View GitHub Profile
function randomArray(length, min, max) {
return new Array(length).fill(0).map(function(n) {
return Math.round(Math.random() * (max - min) + min);
});
}
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
callback: function(value, index, values) {
return '';
},
},
gridLines: {
display: false,
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
// dark mode
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
const newColorScheme = e.matches ? "dark" : "light";
});
@AliwerErgashev
AliwerErgashev / gist:30bc5424c0824567a92880d3c3a71b49
Last active January 25, 2021 17:29
Angular Pipes Filtering on Multiple Keys
<ul>
<li *ngFor="let item of _items | filter:{ label: filterText, description: filterText } : false">{{ item.value }} - {{ item.label }} - {{ item.description }}</li>
</ul>
@Pipe({