Skip to content

Instantly share code, notes, and snippets.

View thedelk's full-sized avatar
💀
Probably refactoring.

Ryan Delk thedelk

💀
Probably refactoring.
View GitHub Profile
| Prefix | Description | Details | Examples |
| ---------- | ------------------------ | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `feat` | Feature | A new feature | • `feat: add dropdown filters to assist with sorting`<br>• `feat: add column selection functionality to result tables`<br>• `feat: add nested navigation drawer` |
| `fix` | Bug Fix | A bug fix | •
// Example on how to create your own apolloClient. Just import this file from any of
// your component to begin to launch your graphql queries, mutations etc and that's it.
// Nothing more is needed, apolloClient by itself is already very powerful, without using vue-apollo.
//
// @see https://www.apollographql.com/docs/react/basics/setup.html
// @see https://www.apollographql.com/docs/react/api/apollo-client.html
import { ApolloClient } from 'apollo-client';
import { createHttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { setContext } from 'apollo-link-context';
@thedelk
thedelk / filterArray.js
Created June 27, 2020 05:26 — forked from jherax/filterArray.js
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@thedelk
thedelk / LICENSE
Created June 16, 2020 03:31 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@thedelk
thedelk / Usage.js
Last active November 11, 2022 20:55 — forked from RajaJaganathan/Usage.js
lodash utility methods
const collections = [
{ id: 1, name: "xyz" },
{ id: 2, name: "ds" },
{ id: 3, name: "rtrt" },
{ id: 4, name: "nhf" },
{ id: 5, name: "qwe" },
];
const filtered = _.findByValues(collections, "id", [1, 3, 4]);
@thedelk
thedelk / README.md
Last active November 11, 2022 21:06 — forked from lopspower/README.md
Hexadecimal color code for transparency
opacity suffix opacity suffix opacity suffix opacity suffix opacity suffix
100% FF 80% CC 60% 99 40% 66 20% 33
99% FC 79% C9 59% 96 39% 63 19% 30
98% FA 78% C7 58% 94 38% 61 18% 2E
97% F7 77% C4 57% 91 37% 5E 17% 2B
96% F5 76% C2 56% 8F 36% 5C 16% 29
95% F2 75% BF 55% 8C 35% 59 15% 26
94% F0 74% BD 54% 8A 34% 57 14% 24
9