Skip to content

Instantly share code, notes, and snippets.

View zebapy's full-sized avatar

Zeb Pykosz zebapy

View GitHub Profile
const fs = require("fs");
const path = require("path");
// open.spotify.com -> open devtools -> network requests -> find a request to grab your Bearer token
const TOKEN = "YOUR_TOKEN";
const fetchSpotify = async ({ endpoint, params, body, method = "GET" }) => {
const baseurl = "https://api.spotify.com/v1/";
const headers = {
Authorization: `Bearer ${TOKEN}`,
@zebapy
zebapy / latest-action-failure.js
Last active February 6, 2024 13:35
A raycast command for fetching the latest failed action step you made
#!/usr/bin/env node
// Required parameters:
// @raycast.schemaVersion 1
// @raycast.title Latest failed github action step link
// @raycast.mode silent
// Optional parameters:
// @raycast.icon 😿
@zebapy
zebapy / NavLink.tsx
Created February 15, 2023 19:41
nextjs active link that checks query string

Keybase proof

I hereby claim:

  • I am zebapy on github.
  • I am zebapy (https://keybase.io/zebapy) on keybase.
  • I have a public key ASA7nE3uPg-2zLY8il4Qo5-HU_A3DTbdmuVIqu6H2mrGuAo

To claim this, I am signing this object:

import { useState } from 'react';
import { useQuery } from '@apollo/client';
import update from 'immutability-helper';
import get from 'lodash/get';
export const usePagerQuery = (
query,
{ variables, updateQuery, itemsPath, countPath, skip }
) => {
const [loadingMore, setLoadingMore] = useState(false);
@zebapy
zebapy / agenda.md
Last active November 6, 2020 00:46

Hunter Agenda

  • Act like you’re the hero in this
  • Make your own destiny story (because you are).
  • Find the damn monsters and stop them.
  • Play your hunter like they’re a real person.

Contents

import React, { ReactElement, ReactNode } from "react";
import styled, { css } from "styled-components";
import { theme } from "../../constants/theme";
type StackDirection = "row" | "column" | "row-reverse" | "column-reverse";
interface StackProps {
space?: number;
direction?: StackDirection;
children: ReactNode;
@zebapy
zebapy / ducky.md
Created September 5, 2020 13:22 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

import React, { useState, useEffect, useRef } from 'react';
import { findDOMNode } from 'react-dom';
import PropTypes from 'prop-types';
import styled, { keyframes } from 'styled-components';
import Router from 'next/router';
import { media } from 'components/style-utils';
import { Box } from 'components';
const fadeInDown = keyframes`
module.exports = {
rules: {
/**
* Possible errors
*/
'color-no-invalid-hex': null, // Disallow invalid hex colors.
'font-family-no-duplicate-names': null, // Disallow duplicate font family names.
'font-family-no-missing-generic-family-keyword': null, // Disallow missing generic families in lists of font family names.
'function-calc-no-invalid': null, // Disallow an invalid expression within calc functions.
'function-calc-no-unspaced-operator': null, // Disallow an unspaced operator within calc functions.