Skip to content

Instantly share code, notes, and snippets.

View AlexxNica's full-sized avatar
🚀

Alexandre Nicastro AlexxNica

🚀
View GitHub Profile
@dend
dend / cross-reference-full.gql
Last active October 8, 2022 09:29
Find cross-referenced issues
{
repository(owner: "microsoft", name: "powertoys") {
issues(first: 100, states: OPEN) {
totalCount
pageInfo {
startCursor
hasNextPage
endCursor
}
edges {
@localden
localden / cross-reference.gql
Created November 19, 2021 19:39
Find GitHub issues with cross-referenced items
{
repository(owner: "microsoft", name: "powertoys") {
issues(first: 100, states: OPEN) {
totalCount
edges {
node {
title
url
timelineItems(first: 100, itemTypes: CROSS_REFERENCED_EVENT) {
nodes {
@halcyondude
halcyondude / flawed-metrics.csv
Last active April 28, 2022 04:59
Medium Table Flawed Metrics
Metric Poor Measure of Output Good for ...
Commits Commits != delivery Understanding commit count
Pull Request Count All PR's !same Understanding PR Count & Grok team interaction
Lines of Code More code isn't better Size and scope of system
Impact (see Lines of Code) (see Lines of Code)
Story or Velocity Points Used for sizing and estimation not output Improving estimation skills
@swinton
swinton / IssueTimelineItemsConnection.graphql
Created November 13, 2020 14:05
GraphQL | IssueTimelineItemsConnection usage
{
resource(url: "https://github.com/microsoft/vscode/issues/10121") {
... on Issue {
url
title
timelineItems(first: 50, itemTypes: [CROSS_REFERENCED_EVENT]) {
edges {
node {
... on CrossReferencedEvent {
source {
@ericelliott
ericelliott / for-await-of-transducers.js
Created April 21, 2020 22:03
for-await-of-transducers
const compose = (...fns) => x => fns.reduceRight((y, f) => f(y), x);
function map(f) {
return async function*(values) {
for await (const x of values) {
yield f(x);
}
};
}
@ericelliott
ericelliott / parallel-fetch.js
Created April 13, 2020 02:10
Parallel requests example
// setup
const wait = value => new Promise(resolve => {
setTimeout(() => resolve(value), 3000);
});
const fetchFoo = () => wait('foo');
const fetchBar = () => wait('bar');
const fetchBaz = () => wait('baz');
const fetchDataSlowly = async time => {
@ericelliott
ericelliott / with-magic-link.js
Created March 30, 2020 23:51
withMagicLink HOC example.
@ericelliott
ericelliott / magic-link-tools.js
Created March 30, 2020 23:37
Magic link tools
@ericelliott
ericelliott / use-fortmatic.js
Created January 17, 2020 01:30
A React hook for Fortmatic integration.
import { useState, useEffect, useRef } from 'react';
import Web3 from 'web3';
import Fortmatic from 'fortmatic';
const usePromise = () => {
const ref = [];
const container = useRef(ref);
ref[0] = new Promise((resolve, reject) => {
ref[1] = resolve;
@rvanbruggen
rvanbruggen / graphtechnologygraph_import.cypher
Last active December 18, 2022 01:54
Graph Technology Landscape Graph
create index on :Node(name);
//load the data in raw form
Load csv with headers from "https://docs.google.com/spreadsheets/u/0/d/17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI/export?format=csv&id=17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI&gid=112267709" as csv
Merge (n:Node {name: csv.Name, type: csv.Type, tags: csv.Tags, link: csv.Link});
// move the 'type' property to a label and remove it as a property, USING APOC (not supported in Graphgist)
MATCH (n:Node)
with n, split(n.type, ",") AS futurelabels
unwind futurelabels as futurelabel