Skip to content

Instantly share code, notes, and snippets.

@peduarte
peduarte / search.tsx
Last active February 17, 2024 19:34
Raycast: YouTube Count Command
import { Action, ActionPanel, Grid, List, getPreferenceValues } from "@raycast/api";
import { useFetch } from "@raycast/utils";
import { htmlUnescape } from "escape-goat";
const YOUTUBE_API_KEY = "";
const CHANNEL_ID = "";
type Snippet = {
title: string;
thumbnails: {
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.6.0/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts@4.6.0/access/Ownable.sol";
contract RainbowKitNFT is ERC1155, Ownable {
uint256 public totalSupply;
constructor() ERC1155("https://rainbowkit-mint-nft-demo.vercel.app/nft.json") {}
//https://cdn.jsdelivr.net/gh/fatbattk/dom-confetti@master/src/main.js
const defaultColors = ['#a864fd', '#29cdff', '#78ff44', '#ff718d', '#fdff6a'];
function createElements(root, elementCount, colors, image, width, height) {
return Array.from({ length: elementCount }).map((_, index) => {
const element = document.createElement('div');
element.style.width = width;
element.style.height = height;
element.style.position = 'absolute';
element.style.willChange = 'transform, opacity';
@peduarte
peduarte / radix-colors-2.md
Last active May 15, 2021 19:29
Radix Colors API Proposal 2

For CSS-in-JS (with tree-shaking):

  • import all colors in light and dark modes
  • import scales in light and dark modes
  • import tokens in light and dark modes
  • make sure the integration with Stitches is as smooth as possible

import all colors in light and dark modes

import { colors, darkColors } from '@radix-ui/colors'
@peduarte
peduarte / radix-colors-1.md
Last active May 15, 2021 19:32
Radix Colors API Proposal 1

For CSS-in-JS (with tree-shaking):

  • import all colors in light and dark modes
  • import all colors in a specific mode
  • import a specific scale in light and dark modes
  • import a specific scale in a specific mode
  • import a specific token in light and dark modes
  • import a specific token in a specific mode
  • make sure the integration with Stitches is as smooth as possible

import all colors in light and dark modes

@peduarte
peduarte / box.tsx
Created April 19, 2021 21:36
Legacy Primitives Box
import styled from 'styled-components';
import {
border,
BorderProps,
borderRadius,
BorderRadiusProps,
boxShadow,
BoxShadowProps,
backgroundColor,
BackgroundColorProps,
@peduarte
peduarte / custom-vscode.css
Last active May 10, 2018 15:55
Custom CSS for VSCode using the "Custom CSS and JS Loader"
.monaco-tree, .part.sidebar {
font-family: "Operator Mono";
font-size: 14px;
line-height: 1.6;
}
@peduarte
peduarte / pedro.json
Created January 24, 2017 12:49
iTerm Profile
{
"Working Directory" : "\/Users\/pedroduarte",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Rows" : 25,
"Ansi 11 Color" : {