Skip to content

Instantly share code, notes, and snippets.

@Sutil
Sutil / form.tsx
Last active February 6, 2025 11:55
Shandcn UI Money Mask Input - NextJS.
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import MoneyInput from "src/components/custom/money-input";
import { Button } from "src/components/ui/button";
import { Form } from "src/components/ui/form";
import * as z from "zod";
const schema = z.object({
@iamtekeste
iamtekeste / render.js
Created May 27, 2022 22:27
Craft.js renderer
// source: https://paste.zauberfisch.com/d/62871445eda3b/craftjs-frontend.js.txt
import React, {Fragment} from "react"
import Container from "./Container.jsx"
import Text from "./Text.jsx"
import Button from "./Button.jsx"
const contentElements = {
Container,
Text,
@TooTallNate
TooTallNate / http-error.js
Created August 3, 2016 00:48
HTTPError class for JavaScript HTTP errors
import { format } from 'url';
import { STATUS_CODES } from 'http';
import uppercamelcase from 'uppercamelcase';
class HTTPError extends Error {
constructor(code, message, extras) {
super(message || STATUS_CODES[code]);
if (arguments.length >= 3 && extras) {
Object.assign(this, extras);
}
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@kjlubick
kjlubick / InstallingMeld
Last active November 2, 2023 02:49
How to install Meld on Windows and getting it set up with Git
After installing it http://sourceforge.net/projects/meld-installer/
I had to tell git where it was:
git config --global merge.tool meld
git config --global diff.tool meld
git config --global mergetool.meld.path “C:\Program Files (x86)\Meld\meld\meld.exe”
And that seems to work. Both merging and diffing with “git difftool” or “git mergetool”