Skip to content

Instantly share code, notes, and snippets.

@chasefleming
chasefleming / cadence-cheatsheat.cdc
Last active May 14, 2025 18:40
Cadence Cheatsheet
// Cadence is a resource-oriented programming language for smart contracts on the Flow blockchain.
///////////////
// 1. Basics //
///////////////
// This is a single-line comment
/*
This is a multi-line comment
@jciruolo
jciruolo / flooksProposal.md
Created March 24, 2023 14:27
A grant proposal for the Dapper Team from Doodles

Flooks - React Hooks for Flow

Grant category

  • Open source maintenance
  • Developer tools / services

Description

flooks is a react hooks library inspired by the wagmi library in the ethereum ecosystem to create a set of easy to use and understand react hooks to build on flow from the frontend. It serves as an easy-to-use wrapper around FCL that simplifies configuration, provides easier and more compact utility and makes getting a user's wallet connected a simple task.

@maapteh
maapteh / use-viewport.tsx
Last active March 23, 2024 03:40
useViewport hook for React
// MODULE
import React, {
FC,
ReactNode,
useState,
useEffect,
createContext,
useContext,
useCallback,
} from 'react';
@mxstbr
mxstbr / Readme.md
Last active October 20, 2024 20:44
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"